diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index eae7202b..8c3e9866 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,6 +21,7 @@ jobs: - os: windows-2016 - os: ubuntu-latest - os: turin-macmini # self-hosted macOS + # - os: rsora-rpi-arm # self-hosted armhf runs-on: ${{ matrix.config.os }} timeout-minutes: 30 steps: diff --git a/.gitignore b/.gitignore index 7318d50a..0f3b9a37 100644 --- a/.gitignore +++ b/.gitignore @@ -13,7 +13,5 @@ src-gen/ yarn*.log # For the VS Code extensions used by Theia. plugins -# generated JS/TS for the gRPC API -arduino-ide-extension/src/node/cli-protocol # the config files for the CLI arduino-ide-extension/data/cli/config diff --git a/README.md b/README.md index 0d7db764..3d191ad4 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,6 @@ yarn ```sh yarn rebuild:electron ``` -Note: this step takes long. It completes in 4-5 minutes on a MacBook Pro, 2.9 GHz Quad-Core Intel Core i7. ### Start ```sh diff --git a/arduino-ide-extension/package.json b/arduino-ide-extension/package.json index 97338f31..8477daac 100644 --- a/arduino-ide-extension/package.json +++ b/arduino-ide-extension/package.json @@ -7,7 +7,7 @@ "node": ">=10.11.0 <12" }, "scripts": { - "prepare": "yarn download-cli && yarn generate-protocol && yarn download-ls && yarn run clean && yarn run build", + "prepare": "yarn download-cli && yarn download-ls && yarn run clean && yarn run build", "clean": "rimraf lib", "download-cli": "node ./scripts/download-cli.js", "download-ls": "node ./scripts/download-ls.js", @@ -19,6 +19,7 @@ "test:watch": "mocha --watch --watch-files lib \"./lib/test/**/*.test.js\"" }, "dependencies": { + "@grpc/grpc-js": "^1.1.1", "@theia/application-package": "next", "@theia/core": "next", "@theia/cpp": "next", @@ -50,7 +51,6 @@ "fuzzy": "^0.1.3", "glob": "^7.1.6", "google-protobuf": "^3.11.4", - "grpc": "^1.24.2", "lodash.debounce": "^4.0.8", "js-yaml": "^3.13.1", "p-queue": "^5.0.0", @@ -73,18 +73,20 @@ "decompress-targz": "^4.1.1", "decompress-unzip": "^4.0.1", "download": "^7.1.0", - "grpc-tools": "^1.8.0", - "grpc_tools_node_protoc_ts": "^2.5.8", + "grpc_tools_node_protoc_ts": "^4.1.0", "mocha": "^7.0.0", "moment": "^2.24.0", "ncp": "^2.0.0", - "protoc": "1.0.4", + "protoc": "^1.0.4", "shelljs": "^0.8.3", "sinon": "^9.0.1", "temp": "^0.9.1", "uuid": "^3.2.1", "yargs": "^11.1.0" }, + "optionalDependencies": { + "grpc-tools": "^1.9.0" + }, "mocha": { "require": [ "reflect-metadata/Reflect" diff --git a/arduino-ide-extension/scripts/download-cli.js b/arduino-ide-extension/scripts/download-cli.js index 63fa55a1..609ac9e0 100755 --- a/arduino-ide-extension/scripts/download-cli.js +++ b/arduino-ide-extension/scripts/download-cli.js @@ -42,6 +42,7 @@ case 'win32': return 'Windows_64bit.zip'; case 'linux': { switch (arch) { + case 'arm': return 'Linux_ARMv7.tar.gz'; case 'arm64': return 'Linux_ARM64.tar.gz'; case 'x64': return 'Linux_64bit.tar.gz'; default: return undefined; diff --git a/arduino-ide-extension/scripts/generate-protocol.js b/arduino-ide-extension/scripts/generate-protocol.js index dba306b9..f4b43b37 100644 --- a/arduino-ide-extension/scripts/generate-protocol.js +++ b/arduino-ide-extension/scripts/generate-protocol.js @@ -40,12 +40,6 @@ shell.exit(1); } - const pluginExec = shell.which('grpc_tools_node_protoc_plugin'); - if (!pluginExec || pluginExec.code !== 0) { - shell.exit(1); - } - const plugin = pluginExec.stdout.trim(); - const rpc = path.join(repository, 'rpc'); const out = path.join(__dirname, '..', 'src', 'node', 'cli-protocol'); shell.mkdir('-p', out); @@ -67,8 +61,7 @@ // Generate JS code from the `.proto` files. if (shell.exec(`grpc_tools_node_protoc \ --js_out=import_style=commonjs,binary:${out} \ ---grpc_out=${out} \ ---plugin=protoc-gen-grpc=${plugin} \ +--grpc_out=generate_package_definition:${out} \ -I ${rpc} \ ${protos.join(' ')}`).code !== 0) { shell.exit(1); @@ -77,7 +70,7 @@ ${protos.join(' ')}`).code !== 0) { // Generate the `.d.ts` files for JS. if (shell.exec(`protoc \ --plugin=protoc-gen-ts=${path.resolve(__dirname, '..', 'node_modules', '.bin', `protoc-gen-ts${platform === 'win32' ? '.cmd' : ''}`)} \ ---ts_out=${out} \ +--ts_out=generate_package_definition:${out} \ -I ${rpc} \ ${protos.join(' ')}`).code !== 0) { shell.exit(1); diff --git a/arduino-ide-extension/src/common/protocol/boards-service.ts b/arduino-ide-extension/src/common/protocol/boards-service.ts index df660801..a98094c7 100644 --- a/arduino-ide-extension/src/common/protocol/boards-service.ts +++ b/arduino-ide-extension/src/common/protocol/boards-service.ts @@ -142,7 +142,7 @@ export namespace Port { } if (isOSX) { // Example: `/dev/cu.usbmodem14401` - if (/(tty|cu)\..*/.test(address.substring('/dev/'.length))) { + if (/(tty|cu)\..*/i.test(address.substring('/dev/'.length))) { return [ '/dev/cu.MALS', '/dev/cu.SOC', @@ -152,7 +152,7 @@ export namespace Port { } // Example: `/dev/ttyACM0` - if (/(ttyS|ttyUSB|ttyACM|ttyAMA|rfcomm|ttyO)[0-9]{1,3}/.test(address.substring('/dev/'.length))) { + if (/(ttyS|ttyUSB|ttyACM|ttyAMA|rfcomm|ttyO)[0-9]{1,3}/i.test(address.substring('/dev/'.length))) { // Default ports were `/dev/ttyS0` -> `/dev/ttyS31` on Ubuntu 16.04.2. if (address.startsWith('/dev/ttyS')) { const index = Number.parseInt(address.substring('/dev/ttyS'.length), 10); diff --git a/arduino-ide-extension/src/node/cli-protocol/commands/board_grpc_pb.js b/arduino-ide-extension/src/node/cli-protocol/commands/board_grpc_pb.js new file mode 100644 index 00000000..97b3a246 --- /dev/null +++ b/arduino-ide-extension/src/node/cli-protocol/commands/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/commands/board_pb.d.ts b/arduino-ide-extension/src/node/cli-protocol/commands/board_pb.d.ts new file mode 100644 index 00000000..2e5054c8 --- /dev/null +++ b/arduino-ide-extension/src/node/cli-protocol/commands/board_pb.d.ts @@ -0,0 +1,624 @@ +// package: cc.arduino.cli.commands +// file: commands/board.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; +import * as commands_common_pb from "../commands/common_pb"; + +export class BoardDetailsReq extends jspb.Message { + + hasInstance(): boolean; + clearInstance(): void; + getInstance(): commands_common_pb.Instance | undefined; + setInstance(value?: commands_common_pb.Instance): BoardDetailsReq; + + getFqbn(): string; + setFqbn(value: string): BoardDetailsReq; + + + 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?: commands_common_pb.Instance.AsObject, + fqbn: string, + } +} + +export class BoardDetailsResp extends jspb.Message { + getFqbn(): string; + setFqbn(value: string): BoardDetailsResp; + + getName(): string; + setName(value: string): BoardDetailsResp; + + getVersion(): string; + setVersion(value: string): BoardDetailsResp; + + getPropertiesid(): string; + setPropertiesid(value: string): BoardDetailsResp; + + getAlias(): string; + setAlias(value: string): BoardDetailsResp; + + getOfficial(): boolean; + setOfficial(value: boolean): BoardDetailsResp; + + getPinout(): string; + setPinout(value: string): BoardDetailsResp; + + + hasPackage(): boolean; + clearPackage(): void; + getPackage(): Package | undefined; + setPackage(value?: Package): BoardDetailsResp; + + + hasPlatform(): boolean; + clearPlatform(): void; + getPlatform(): BoardPlatform | undefined; + setPlatform(value?: BoardPlatform): BoardDetailsResp; + + clearToolsdependenciesList(): void; + getToolsdependenciesList(): Array; + setToolsdependenciesList(value: Array): BoardDetailsResp; + addToolsdependencies(value?: ToolsDependencies, index?: number): ToolsDependencies; + + clearConfigOptionsList(): void; + getConfigOptionsList(): Array; + setConfigOptionsList(value: Array): BoardDetailsResp; + addConfigOptions(value?: ConfigOption, index?: number): ConfigOption; + + clearIdentificationPrefList(): void; + getIdentificationPrefList(): Array; + setIdentificationPrefList(value: Array): BoardDetailsResp; + addIdentificationPref(value?: IdentificationPref, index?: number): IdentificationPref; + + + 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 = { + fqbn: string, + name: string, + version: string, + propertiesid: string, + alias: string, + official: boolean, + pinout: string, + pb_package?: Package.AsObject, + platform?: BoardPlatform.AsObject, + toolsdependenciesList: Array, + configOptionsList: Array, + identificationPrefList: Array, + } +} + +export class IdentificationPref extends jspb.Message { + + hasUsbid(): boolean; + clearUsbid(): void; + getUsbid(): USBID | undefined; + setUsbid(value?: USBID): IdentificationPref; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): IdentificationPref.AsObject; + static toObject(includeInstance: boolean, msg: IdentificationPref): IdentificationPref.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: IdentificationPref, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): IdentificationPref; + static deserializeBinaryFromReader(message: IdentificationPref, reader: jspb.BinaryReader): IdentificationPref; +} + +export namespace IdentificationPref { + export type AsObject = { + usbid?: USBID.AsObject, + } +} + +export class USBID extends jspb.Message { + getVid(): string; + setVid(value: string): USBID; + + getPid(): string; + setPid(value: string): USBID; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): USBID.AsObject; + static toObject(includeInstance: boolean, msg: USBID): USBID.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: USBID, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): USBID; + static deserializeBinaryFromReader(message: USBID, reader: jspb.BinaryReader): USBID; +} + +export namespace USBID { + export type AsObject = { + vid: string, + pid: string, + } +} + +export class Package extends jspb.Message { + getMaintainer(): string; + setMaintainer(value: string): Package; + + getUrl(): string; + setUrl(value: string): Package; + + getWebsiteurl(): string; + setWebsiteurl(value: string): Package; + + getEmail(): string; + setEmail(value: string): Package; + + getName(): string; + setName(value: string): Package; + + + hasHelp(): boolean; + clearHelp(): void; + getHelp(): Help | undefined; + setHelp(value?: Help): Package; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Package.AsObject; + static toObject(includeInstance: boolean, msg: Package): Package.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Package, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Package; + static deserializeBinaryFromReader(message: Package, reader: jspb.BinaryReader): Package; +} + +export namespace Package { + export type AsObject = { + maintainer: string, + url: string, + websiteurl: string, + email: string, + name: string, + help?: Help.AsObject, + } +} + +export class Help extends jspb.Message { + getOnline(): string; + setOnline(value: string): Help; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Help.AsObject; + static toObject(includeInstance: boolean, msg: Help): Help.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Help, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Help; + static deserializeBinaryFromReader(message: Help, reader: jspb.BinaryReader): Help; +} + +export namespace Help { + export type AsObject = { + online: string, + } +} + +export class BoardPlatform extends jspb.Message { + getArchitecture(): string; + setArchitecture(value: string): BoardPlatform; + + getCategory(): string; + setCategory(value: string): BoardPlatform; + + getUrl(): string; + setUrl(value: string): BoardPlatform; + + getArchivefilename(): string; + setArchivefilename(value: string): BoardPlatform; + + getChecksum(): string; + setChecksum(value: string): BoardPlatform; + + getSize(): number; + setSize(value: number): BoardPlatform; + + getName(): string; + setName(value: string): BoardPlatform; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BoardPlatform.AsObject; + static toObject(includeInstance: boolean, msg: BoardPlatform): BoardPlatform.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BoardPlatform, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BoardPlatform; + static deserializeBinaryFromReader(message: BoardPlatform, reader: jspb.BinaryReader): BoardPlatform; +} + +export namespace BoardPlatform { + export type AsObject = { + architecture: string, + category: string, + url: string, + archivefilename: string, + checksum: string, + size: number, + name: string, + } +} + +export class ToolsDependencies extends jspb.Message { + getPackager(): string; + setPackager(value: string): ToolsDependencies; + + getName(): string; + setName(value: string): ToolsDependencies; + + getVersion(): string; + setVersion(value: string): ToolsDependencies; + + clearSystemsList(): void; + getSystemsList(): Array; + setSystemsList(value: Array): ToolsDependencies; + addSystems(value?: Systems, index?: number): Systems; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ToolsDependencies.AsObject; + static toObject(includeInstance: boolean, msg: ToolsDependencies): ToolsDependencies.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ToolsDependencies, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ToolsDependencies; + static deserializeBinaryFromReader(message: ToolsDependencies, reader: jspb.BinaryReader): ToolsDependencies; +} + +export namespace ToolsDependencies { + export type AsObject = { + packager: string, + name: string, + version: string, + systemsList: Array, + } +} + +export class Systems extends jspb.Message { + getChecksum(): string; + setChecksum(value: string): Systems; + + getHost(): string; + setHost(value: string): Systems; + + getArchivefilename(): string; + setArchivefilename(value: string): Systems; + + getUrl(): string; + setUrl(value: string): Systems; + + getSize(): number; + setSize(value: number): Systems; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Systems.AsObject; + static toObject(includeInstance: boolean, msg: Systems): Systems.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Systems, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Systems; + static deserializeBinaryFromReader(message: Systems, reader: jspb.BinaryReader): Systems; +} + +export namespace Systems { + export type AsObject = { + checksum: string, + host: string, + archivefilename: string, + url: string, + size: number, + } +} + +export class ConfigOption extends jspb.Message { + getOption(): string; + setOption(value: string): ConfigOption; + + getOptionLabel(): string; + setOptionLabel(value: string): ConfigOption; + + clearValuesList(): void; + getValuesList(): Array; + setValuesList(value: Array): ConfigOption; + 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): ConfigValue; + + getValueLabel(): string; + setValueLabel(value: string): ConfigValue; + + getSelected(): boolean; + setSelected(value: boolean): ConfigValue; + + + 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 BoardAttachReq extends jspb.Message { + + hasInstance(): boolean; + clearInstance(): void; + getInstance(): commands_common_pb.Instance | undefined; + setInstance(value?: commands_common_pb.Instance): BoardAttachReq; + + getBoardUri(): string; + setBoardUri(value: string): BoardAttachReq; + + getSketchPath(): string; + setSketchPath(value: string): BoardAttachReq; + + getSearchTimeout(): string; + setSearchTimeout(value: string): BoardAttachReq; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BoardAttachReq.AsObject; + static toObject(includeInstance: boolean, msg: BoardAttachReq): BoardAttachReq.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BoardAttachReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BoardAttachReq; + static deserializeBinaryFromReader(message: BoardAttachReq, reader: jspb.BinaryReader): BoardAttachReq; +} + +export namespace BoardAttachReq { + export type AsObject = { + instance?: commands_common_pb.Instance.AsObject, + boardUri: string, + sketchPath: string, + searchTimeout: string, + } +} + +export class BoardAttachResp extends jspb.Message { + + hasTaskProgress(): boolean; + clearTaskProgress(): void; + getTaskProgress(): commands_common_pb.TaskProgress | undefined; + setTaskProgress(value?: commands_common_pb.TaskProgress): BoardAttachResp; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BoardAttachResp.AsObject; + static toObject(includeInstance: boolean, msg: BoardAttachResp): BoardAttachResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BoardAttachResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BoardAttachResp; + static deserializeBinaryFromReader(message: BoardAttachResp, reader: jspb.BinaryReader): BoardAttachResp; +} + +export namespace BoardAttachResp { + export type AsObject = { + taskProgress?: commands_common_pb.TaskProgress.AsObject, + } +} + +export class BoardListReq extends jspb.Message { + + hasInstance(): boolean; + clearInstance(): void; + getInstance(): commands_common_pb.Instance | undefined; + setInstance(value?: commands_common_pb.Instance): BoardListReq; + + + 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?: commands_common_pb.Instance.AsObject, + } +} + +export class BoardListResp extends jspb.Message { + clearPortsList(): void; + getPortsList(): Array; + setPortsList(value: Array): BoardListResp; + addPorts(value?: DetectedPort, index?: number): DetectedPort; + + + 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 = { + portsList: Array, + } +} + +export class DetectedPort extends jspb.Message { + getAddress(): string; + setAddress(value: string): DetectedPort; + + getProtocol(): string; + setProtocol(value: string): DetectedPort; + + getProtocolLabel(): string; + setProtocolLabel(value: string): DetectedPort; + + clearBoardsList(): void; + getBoardsList(): Array; + setBoardsList(value: Array): DetectedPort; + addBoards(value?: BoardListItem, index?: number): BoardListItem; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DetectedPort.AsObject; + static toObject(includeInstance: boolean, msg: DetectedPort): DetectedPort.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DetectedPort, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DetectedPort; + static deserializeBinaryFromReader(message: DetectedPort, reader: jspb.BinaryReader): DetectedPort; +} + +export namespace DetectedPort { + export type AsObject = { + address: string, + protocol: string, + protocolLabel: string, + boardsList: Array, + } +} + +export class BoardListAllReq extends jspb.Message { + + hasInstance(): boolean; + clearInstance(): void; + getInstance(): commands_common_pb.Instance | undefined; + setInstance(value?: commands_common_pb.Instance): BoardListAllReq; + + clearSearchArgsList(): void; + getSearchArgsList(): Array; + setSearchArgsList(value: Array): BoardListAllReq; + addSearchArgs(value: string, index?: number): string; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BoardListAllReq.AsObject; + static toObject(includeInstance: boolean, msg: BoardListAllReq): BoardListAllReq.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BoardListAllReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BoardListAllReq; + static deserializeBinaryFromReader(message: BoardListAllReq, reader: jspb.BinaryReader): BoardListAllReq; +} + +export namespace BoardListAllReq { + export type AsObject = { + instance?: commands_common_pb.Instance.AsObject, + searchArgsList: Array, + } +} + +export class BoardListAllResp extends jspb.Message { + clearBoardsList(): void; + getBoardsList(): Array; + setBoardsList(value: Array): BoardListAllResp; + addBoards(value?: BoardListItem, index?: number): BoardListItem; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BoardListAllResp.AsObject; + static toObject(includeInstance: boolean, msg: BoardListAllResp): BoardListAllResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BoardListAllResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BoardListAllResp; + static deserializeBinaryFromReader(message: BoardListAllResp, reader: jspb.BinaryReader): BoardListAllResp; +} + +export namespace BoardListAllResp { + export type AsObject = { + boardsList: Array, + } +} + +export class BoardListItem extends jspb.Message { + getName(): string; + setName(value: string): BoardListItem; + + getFqbn(): string; + setFqbn(value: string): BoardListItem; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BoardListItem.AsObject; + static toObject(includeInstance: boolean, msg: BoardListItem): BoardListItem.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BoardListItem, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BoardListItem; + static deserializeBinaryFromReader(message: BoardListItem, reader: jspb.BinaryReader): BoardListItem; +} + +export namespace BoardListItem { + export type AsObject = { + name: string, + fqbn: string, + } +} diff --git a/arduino-ide-extension/src/node/cli-protocol/commands/board_pb.js b/arduino-ide-extension/src/node/cli-protocol/commands/board_pb.js new file mode 100644 index 00000000..27f6ca5f --- /dev/null +++ b/arduino-ide-extension/src/node/cli-protocol/commands/board_pb.js @@ -0,0 +1,4636 @@ +// source: commands/board.proto +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var commands_common_pb = require('../commands/common_pb.js'); +goog.object.extend(proto, commands_common_pb); +goog.exportSymbol('proto.cc.arduino.cli.commands.BoardAttachReq', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.BoardAttachResp', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.BoardDetailsReq', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.BoardDetailsResp', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.BoardListAllReq', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.BoardListAllResp', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.BoardListItem', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.BoardListReq', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.BoardListResp', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.BoardPlatform', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.ConfigOption', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.ConfigValue', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.DetectedPort', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.Help', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.IdentificationPref', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.Package', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.Systems', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.ToolsDependencies', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.USBID', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.BoardDetailsReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.BoardDetailsReq, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.BoardDetailsReq.displayName = 'proto.cc.arduino.cli.commands.BoardDetailsReq'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.BoardDetailsResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cc.arduino.cli.commands.BoardDetailsResp.repeatedFields_, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.BoardDetailsResp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.BoardDetailsResp.displayName = 'proto.cc.arduino.cli.commands.BoardDetailsResp'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.IdentificationPref = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.IdentificationPref, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.IdentificationPref.displayName = 'proto.cc.arduino.cli.commands.IdentificationPref'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.USBID = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.USBID, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.USBID.displayName = 'proto.cc.arduino.cli.commands.USBID'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.Package = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.Package, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.Package.displayName = 'proto.cc.arduino.cli.commands.Package'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.Help = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.Help, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.Help.displayName = 'proto.cc.arduino.cli.commands.Help'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.BoardPlatform = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.BoardPlatform, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.BoardPlatform.displayName = 'proto.cc.arduino.cli.commands.BoardPlatform'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.ToolsDependencies = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cc.arduino.cli.commands.ToolsDependencies.repeatedFields_, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.ToolsDependencies, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.ToolsDependencies.displayName = 'proto.cc.arduino.cli.commands.ToolsDependencies'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.Systems = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.Systems, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.Systems.displayName = 'proto.cc.arduino.cli.commands.Systems'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.ConfigOption = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cc.arduino.cli.commands.ConfigOption.repeatedFields_, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.ConfigOption, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.ConfigOption.displayName = 'proto.cc.arduino.cli.commands.ConfigOption'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.ConfigValue = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.ConfigValue, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.ConfigValue.displayName = 'proto.cc.arduino.cli.commands.ConfigValue'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.BoardAttachReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.BoardAttachReq, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.BoardAttachReq.displayName = 'proto.cc.arduino.cli.commands.BoardAttachReq'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.BoardAttachResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.BoardAttachResp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.BoardAttachResp.displayName = 'proto.cc.arduino.cli.commands.BoardAttachResp'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.BoardListReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.BoardListReq, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.BoardListReq.displayName = 'proto.cc.arduino.cli.commands.BoardListReq'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.BoardListResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cc.arduino.cli.commands.BoardListResp.repeatedFields_, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.BoardListResp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.BoardListResp.displayName = 'proto.cc.arduino.cli.commands.BoardListResp'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.DetectedPort = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cc.arduino.cli.commands.DetectedPort.repeatedFields_, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.DetectedPort, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.DetectedPort.displayName = 'proto.cc.arduino.cli.commands.DetectedPort'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.BoardListAllReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cc.arduino.cli.commands.BoardListAllReq.repeatedFields_, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.BoardListAllReq, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.BoardListAllReq.displayName = 'proto.cc.arduino.cli.commands.BoardListAllReq'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.BoardListAllResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cc.arduino.cli.commands.BoardListAllResp.repeatedFields_, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.BoardListAllResp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.BoardListAllResp.displayName = 'proto.cc.arduino.cli.commands.BoardListAllResp'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.BoardListItem = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.BoardListItem, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.BoardListItem.displayName = 'proto.cc.arduino.cli.commands.BoardListItem'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.BoardDetailsReq.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.BoardDetailsReq.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.BoardDetailsReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.BoardDetailsReq.toObject = function(includeInstance, msg) { + var f, obj = { + instance: (f = msg.getInstance()) && commands_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.cc.arduino.cli.commands.BoardDetailsReq} + */ +proto.cc.arduino.cli.commands.BoardDetailsReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.BoardDetailsReq; + return proto.cc.arduino.cli.commands.BoardDetailsReq.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.BoardDetailsReq} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.BoardDetailsReq} + */ +proto.cc.arduino.cli.commands.BoardDetailsReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new commands_common_pb.Instance; + reader.readMessage(value,commands_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.cc.arduino.cli.commands.BoardDetailsReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.BoardDetailsReq} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.BoardDetailsReq.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInstance(); + if (f != null) { + writer.writeMessage( + 1, + f, + commands_common_pb.Instance.serializeBinaryToWriter + ); + } + f = message.getFqbn(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional Instance instance = 1; + * @return {?proto.cc.arduino.cli.commands.Instance} + */ +proto.cc.arduino.cli.commands.BoardDetailsReq.prototype.getInstance = function() { + return /** @type{?proto.cc.arduino.cli.commands.Instance} */ ( + jspb.Message.getWrapperField(this, commands_common_pb.Instance, 1)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.Instance|undefined} value + * @return {!proto.cc.arduino.cli.commands.BoardDetailsReq} returns this +*/ +proto.cc.arduino.cli.commands.BoardDetailsReq.prototype.setInstance = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.BoardDetailsReq} returns this + */ +proto.cc.arduino.cli.commands.BoardDetailsReq.prototype.clearInstance = function() { + return this.setInstance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.BoardDetailsReq.prototype.hasInstance = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string fqbn = 2; + * @return {string} + */ +proto.cc.arduino.cli.commands.BoardDetailsReq.prototype.getFqbn = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.BoardDetailsReq} returns this + */ +proto.cc.arduino.cli.commands.BoardDetailsReq.prototype.setFqbn = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cc.arduino.cli.commands.BoardDetailsResp.repeatedFields_ = [10,11,12]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.BoardDetailsResp.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.BoardDetailsResp.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.BoardDetailsResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.BoardDetailsResp.toObject = function(includeInstance, msg) { + var f, obj = { + fqbn: jspb.Message.getFieldWithDefault(msg, 1, ""), + name: jspb.Message.getFieldWithDefault(msg, 2, ""), + version: jspb.Message.getFieldWithDefault(msg, 3, ""), + propertiesid: jspb.Message.getFieldWithDefault(msg, 4, ""), + alias: jspb.Message.getFieldWithDefault(msg, 5, ""), + official: jspb.Message.getBooleanFieldWithDefault(msg, 6, false), + pinout: jspb.Message.getFieldWithDefault(msg, 7, ""), + pb_package: (f = msg.getPackage()) && proto.cc.arduino.cli.commands.Package.toObject(includeInstance, f), + platform: (f = msg.getPlatform()) && proto.cc.arduino.cli.commands.BoardPlatform.toObject(includeInstance, f), + toolsdependenciesList: jspb.Message.toObjectList(msg.getToolsdependenciesList(), + proto.cc.arduino.cli.commands.ToolsDependencies.toObject, includeInstance), + configOptionsList: jspb.Message.toObjectList(msg.getConfigOptionsList(), + proto.cc.arduino.cli.commands.ConfigOption.toObject, includeInstance), + identificationPrefList: jspb.Message.toObjectList(msg.getIdentificationPrefList(), + proto.cc.arduino.cli.commands.IdentificationPref.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.cc.arduino.cli.commands.BoardDetailsResp} + */ +proto.cc.arduino.cli.commands.BoardDetailsResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.BoardDetailsResp; + return proto.cc.arduino.cli.commands.BoardDetailsResp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.BoardDetailsResp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.BoardDetailsResp} + */ +proto.cc.arduino.cli.commands.BoardDetailsResp.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.setFqbn(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; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setPropertiesid(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setAlias(value); + break; + case 6: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setOfficial(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setPinout(value); + break; + case 8: + var value = new proto.cc.arduino.cli.commands.Package; + reader.readMessage(value,proto.cc.arduino.cli.commands.Package.deserializeBinaryFromReader); + msg.setPackage(value); + break; + case 9: + var value = new proto.cc.arduino.cli.commands.BoardPlatform; + reader.readMessage(value,proto.cc.arduino.cli.commands.BoardPlatform.deserializeBinaryFromReader); + msg.setPlatform(value); + break; + case 10: + var value = new proto.cc.arduino.cli.commands.ToolsDependencies; + reader.readMessage(value,proto.cc.arduino.cli.commands.ToolsDependencies.deserializeBinaryFromReader); + msg.addToolsdependencies(value); + break; + case 11: + var value = new proto.cc.arduino.cli.commands.ConfigOption; + reader.readMessage(value,proto.cc.arduino.cli.commands.ConfigOption.deserializeBinaryFromReader); + msg.addConfigOptions(value); + break; + case 12: + var value = new proto.cc.arduino.cli.commands.IdentificationPref; + reader.readMessage(value,proto.cc.arduino.cli.commands.IdentificationPref.deserializeBinaryFromReader); + msg.addIdentificationPref(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.commands.BoardDetailsResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.BoardDetailsResp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.BoardDetailsResp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFqbn(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getVersion(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getPropertiesid(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getAlias(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getOfficial(); + if (f) { + writer.writeBool( + 6, + f + ); + } + f = message.getPinout(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } + f = message.getPackage(); + if (f != null) { + writer.writeMessage( + 8, + f, + proto.cc.arduino.cli.commands.Package.serializeBinaryToWriter + ); + } + f = message.getPlatform(); + if (f != null) { + writer.writeMessage( + 9, + f, + proto.cc.arduino.cli.commands.BoardPlatform.serializeBinaryToWriter + ); + } + f = message.getToolsdependenciesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 10, + f, + proto.cc.arduino.cli.commands.ToolsDependencies.serializeBinaryToWriter + ); + } + f = message.getConfigOptionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 11, + f, + proto.cc.arduino.cli.commands.ConfigOption.serializeBinaryToWriter + ); + } + f = message.getIdentificationPrefList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 12, + f, + proto.cc.arduino.cli.commands.IdentificationPref.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string fqbn = 1; + * @return {string} + */ +proto.cc.arduino.cli.commands.BoardDetailsResp.prototype.getFqbn = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.BoardDetailsResp} returns this + */ +proto.cc.arduino.cli.commands.BoardDetailsResp.prototype.setFqbn = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string name = 2; + * @return {string} + */ +proto.cc.arduino.cli.commands.BoardDetailsResp.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.BoardDetailsResp} returns this + */ +proto.cc.arduino.cli.commands.BoardDetailsResp.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string version = 3; + * @return {string} + */ +proto.cc.arduino.cli.commands.BoardDetailsResp.prototype.getVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.BoardDetailsResp} returns this + */ +proto.cc.arduino.cli.commands.BoardDetailsResp.prototype.setVersion = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string propertiesId = 4; + * @return {string} + */ +proto.cc.arduino.cli.commands.BoardDetailsResp.prototype.getPropertiesid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.BoardDetailsResp} returns this + */ +proto.cc.arduino.cli.commands.BoardDetailsResp.prototype.setPropertiesid = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string alias = 5; + * @return {string} + */ +proto.cc.arduino.cli.commands.BoardDetailsResp.prototype.getAlias = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.BoardDetailsResp} returns this + */ +proto.cc.arduino.cli.commands.BoardDetailsResp.prototype.setAlias = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional bool official = 6; + * @return {boolean} + */ +proto.cc.arduino.cli.commands.BoardDetailsResp.prototype.getOfficial = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cc.arduino.cli.commands.BoardDetailsResp} returns this + */ +proto.cc.arduino.cli.commands.BoardDetailsResp.prototype.setOfficial = function(value) { + return jspb.Message.setProto3BooleanField(this, 6, value); +}; + + +/** + * optional string pinout = 7; + * @return {string} + */ +proto.cc.arduino.cli.commands.BoardDetailsResp.prototype.getPinout = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.BoardDetailsResp} returns this + */ +proto.cc.arduino.cli.commands.BoardDetailsResp.prototype.setPinout = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + +/** + * optional Package package = 8; + * @return {?proto.cc.arduino.cli.commands.Package} + */ +proto.cc.arduino.cli.commands.BoardDetailsResp.prototype.getPackage = function() { + return /** @type{?proto.cc.arduino.cli.commands.Package} */ ( + jspb.Message.getWrapperField(this, proto.cc.arduino.cli.commands.Package, 8)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.Package|undefined} value + * @return {!proto.cc.arduino.cli.commands.BoardDetailsResp} returns this +*/ +proto.cc.arduino.cli.commands.BoardDetailsResp.prototype.setPackage = function(value) { + return jspb.Message.setWrapperField(this, 8, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.BoardDetailsResp} returns this + */ +proto.cc.arduino.cli.commands.BoardDetailsResp.prototype.clearPackage = function() { + return this.setPackage(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.BoardDetailsResp.prototype.hasPackage = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional BoardPlatform platform = 9; + * @return {?proto.cc.arduino.cli.commands.BoardPlatform} + */ +proto.cc.arduino.cli.commands.BoardDetailsResp.prototype.getPlatform = function() { + return /** @type{?proto.cc.arduino.cli.commands.BoardPlatform} */ ( + jspb.Message.getWrapperField(this, proto.cc.arduino.cli.commands.BoardPlatform, 9)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.BoardPlatform|undefined} value + * @return {!proto.cc.arduino.cli.commands.BoardDetailsResp} returns this +*/ +proto.cc.arduino.cli.commands.BoardDetailsResp.prototype.setPlatform = function(value) { + return jspb.Message.setWrapperField(this, 9, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.BoardDetailsResp} returns this + */ +proto.cc.arduino.cli.commands.BoardDetailsResp.prototype.clearPlatform = function() { + return this.setPlatform(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.BoardDetailsResp.prototype.hasPlatform = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +/** + * repeated ToolsDependencies toolsDependencies = 10; + * @return {!Array} + */ +proto.cc.arduino.cli.commands.BoardDetailsResp.prototype.getToolsdependenciesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cc.arduino.cli.commands.ToolsDependencies, 10)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cc.arduino.cli.commands.BoardDetailsResp} returns this +*/ +proto.cc.arduino.cli.commands.BoardDetailsResp.prototype.setToolsdependenciesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 10, value); +}; + + +/** + * @param {!proto.cc.arduino.cli.commands.ToolsDependencies=} opt_value + * @param {number=} opt_index + * @return {!proto.cc.arduino.cli.commands.ToolsDependencies} + */ +proto.cc.arduino.cli.commands.BoardDetailsResp.prototype.addToolsdependencies = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 10, opt_value, proto.cc.arduino.cli.commands.ToolsDependencies, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cc.arduino.cli.commands.BoardDetailsResp} returns this + */ +proto.cc.arduino.cli.commands.BoardDetailsResp.prototype.clearToolsdependenciesList = function() { + return this.setToolsdependenciesList([]); +}; + + +/** + * repeated ConfigOption config_options = 11; + * @return {!Array} + */ +proto.cc.arduino.cli.commands.BoardDetailsResp.prototype.getConfigOptionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cc.arduino.cli.commands.ConfigOption, 11)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cc.arduino.cli.commands.BoardDetailsResp} returns this +*/ +proto.cc.arduino.cli.commands.BoardDetailsResp.prototype.setConfigOptionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 11, value); +}; + + +/** + * @param {!proto.cc.arduino.cli.commands.ConfigOption=} opt_value + * @param {number=} opt_index + * @return {!proto.cc.arduino.cli.commands.ConfigOption} + */ +proto.cc.arduino.cli.commands.BoardDetailsResp.prototype.addConfigOptions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 11, opt_value, proto.cc.arduino.cli.commands.ConfigOption, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cc.arduino.cli.commands.BoardDetailsResp} returns this + */ +proto.cc.arduino.cli.commands.BoardDetailsResp.prototype.clearConfigOptionsList = function() { + return this.setConfigOptionsList([]); +}; + + +/** + * repeated IdentificationPref identification_pref = 12; + * @return {!Array} + */ +proto.cc.arduino.cli.commands.BoardDetailsResp.prototype.getIdentificationPrefList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cc.arduino.cli.commands.IdentificationPref, 12)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cc.arduino.cli.commands.BoardDetailsResp} returns this +*/ +proto.cc.arduino.cli.commands.BoardDetailsResp.prototype.setIdentificationPrefList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 12, value); +}; + + +/** + * @param {!proto.cc.arduino.cli.commands.IdentificationPref=} opt_value + * @param {number=} opt_index + * @return {!proto.cc.arduino.cli.commands.IdentificationPref} + */ +proto.cc.arduino.cli.commands.BoardDetailsResp.prototype.addIdentificationPref = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 12, opt_value, proto.cc.arduino.cli.commands.IdentificationPref, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cc.arduino.cli.commands.BoardDetailsResp} returns this + */ +proto.cc.arduino.cli.commands.BoardDetailsResp.prototype.clearIdentificationPrefList = function() { + return this.setIdentificationPrefList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.IdentificationPref.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.IdentificationPref.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.IdentificationPref} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.IdentificationPref.toObject = function(includeInstance, msg) { + var f, obj = { + usbid: (f = msg.getUsbid()) && proto.cc.arduino.cli.commands.USBID.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.cc.arduino.cli.commands.IdentificationPref} + */ +proto.cc.arduino.cli.commands.IdentificationPref.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.IdentificationPref; + return proto.cc.arduino.cli.commands.IdentificationPref.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.IdentificationPref} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.IdentificationPref} + */ +proto.cc.arduino.cli.commands.IdentificationPref.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cc.arduino.cli.commands.USBID; + reader.readMessage(value,proto.cc.arduino.cli.commands.USBID.deserializeBinaryFromReader); + msg.setUsbid(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.commands.IdentificationPref.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.IdentificationPref.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cc.arduino.cli.commands.IdentificationPref} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.IdentificationPref.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUsbid(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.cc.arduino.cli.commands.USBID.serializeBinaryToWriter + ); + } +}; + + +/** + * optional USBID usbID = 1; + * @return {?proto.cc.arduino.cli.commands.USBID} + */ +proto.cc.arduino.cli.commands.IdentificationPref.prototype.getUsbid = function() { + return /** @type{?proto.cc.arduino.cli.commands.USBID} */ ( + jspb.Message.getWrapperField(this, proto.cc.arduino.cli.commands.USBID, 1)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.USBID|undefined} value + * @return {!proto.cc.arduino.cli.commands.IdentificationPref} returns this +*/ +proto.cc.arduino.cli.commands.IdentificationPref.prototype.setUsbid = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.IdentificationPref} returns this + */ +proto.cc.arduino.cli.commands.IdentificationPref.prototype.clearUsbid = function() { + return this.setUsbid(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.IdentificationPref.prototype.hasUsbid = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.USBID.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.USBID.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.USBID} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.USBID.toObject = function(includeInstance, msg) { + var f, obj = { + vid: jspb.Message.getFieldWithDefault(msg, 1, ""), + pid: 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.cc.arduino.cli.commands.USBID} + */ +proto.cc.arduino.cli.commands.USBID.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.USBID; + return proto.cc.arduino.cli.commands.USBID.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.USBID} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.USBID} + */ +proto.cc.arduino.cli.commands.USBID.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.setVid(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setPid(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.commands.USBID.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.USBID.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cc.arduino.cli.commands.USBID} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.USBID.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getVid(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPid(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string VID = 1; + * @return {string} + */ +proto.cc.arduino.cli.commands.USBID.prototype.getVid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.USBID} returns this + */ +proto.cc.arduino.cli.commands.USBID.prototype.setVid = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string PID = 2; + * @return {string} + */ +proto.cc.arduino.cli.commands.USBID.prototype.getPid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.USBID} returns this + */ +proto.cc.arduino.cli.commands.USBID.prototype.setPid = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.Package.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.Package.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.Package} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.Package.toObject = function(includeInstance, msg) { + var f, obj = { + maintainer: jspb.Message.getFieldWithDefault(msg, 1, ""), + url: jspb.Message.getFieldWithDefault(msg, 2, ""), + websiteurl: jspb.Message.getFieldWithDefault(msg, 3, ""), + email: jspb.Message.getFieldWithDefault(msg, 4, ""), + name: jspb.Message.getFieldWithDefault(msg, 5, ""), + help: (f = msg.getHelp()) && proto.cc.arduino.cli.commands.Help.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.cc.arduino.cli.commands.Package} + */ +proto.cc.arduino.cli.commands.Package.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.Package; + return proto.cc.arduino.cli.commands.Package.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.Package} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.Package} + */ +proto.cc.arduino.cli.commands.Package.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.setMaintainer(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setUrl(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setWebsiteurl(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setEmail(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 6: + var value = new proto.cc.arduino.cli.commands.Help; + reader.readMessage(value,proto.cc.arduino.cli.commands.Help.deserializeBinaryFromReader); + msg.setHelp(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.commands.Package.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.Package.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cc.arduino.cli.commands.Package} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.Package.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMaintainer(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getUrl(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getWebsiteurl(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getEmail(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getHelp(); + if (f != null) { + writer.writeMessage( + 6, + f, + proto.cc.arduino.cli.commands.Help.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string maintainer = 1; + * @return {string} + */ +proto.cc.arduino.cli.commands.Package.prototype.getMaintainer = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.Package} returns this + */ +proto.cc.arduino.cli.commands.Package.prototype.setMaintainer = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string url = 2; + * @return {string} + */ +proto.cc.arduino.cli.commands.Package.prototype.getUrl = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.Package} returns this + */ +proto.cc.arduino.cli.commands.Package.prototype.setUrl = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string websiteURL = 3; + * @return {string} + */ +proto.cc.arduino.cli.commands.Package.prototype.getWebsiteurl = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.Package} returns this + */ +proto.cc.arduino.cli.commands.Package.prototype.setWebsiteurl = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string email = 4; + * @return {string} + */ +proto.cc.arduino.cli.commands.Package.prototype.getEmail = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.Package} returns this + */ +proto.cc.arduino.cli.commands.Package.prototype.setEmail = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string name = 5; + * @return {string} + */ +proto.cc.arduino.cli.commands.Package.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.Package} returns this + */ +proto.cc.arduino.cli.commands.Package.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional Help help = 6; + * @return {?proto.cc.arduino.cli.commands.Help} + */ +proto.cc.arduino.cli.commands.Package.prototype.getHelp = function() { + return /** @type{?proto.cc.arduino.cli.commands.Help} */ ( + jspb.Message.getWrapperField(this, proto.cc.arduino.cli.commands.Help, 6)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.Help|undefined} value + * @return {!proto.cc.arduino.cli.commands.Package} returns this +*/ +proto.cc.arduino.cli.commands.Package.prototype.setHelp = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.Package} returns this + */ +proto.cc.arduino.cli.commands.Package.prototype.clearHelp = function() { + return this.setHelp(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.Package.prototype.hasHelp = function() { + return jspb.Message.getField(this, 6) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.Help.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.Help.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.Help} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.Help.toObject = function(includeInstance, msg) { + var f, obj = { + online: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cc.arduino.cli.commands.Help} + */ +proto.cc.arduino.cli.commands.Help.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.Help; + return proto.cc.arduino.cli.commands.Help.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.Help} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.Help} + */ +proto.cc.arduino.cli.commands.Help.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.setOnline(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.commands.Help.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.Help.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cc.arduino.cli.commands.Help} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.Help.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOnline(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string online = 1; + * @return {string} + */ +proto.cc.arduino.cli.commands.Help.prototype.getOnline = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.Help} returns this + */ +proto.cc.arduino.cli.commands.Help.prototype.setOnline = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.BoardPlatform.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.BoardPlatform.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.BoardPlatform} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.BoardPlatform.toObject = function(includeInstance, msg) { + var f, obj = { + architecture: jspb.Message.getFieldWithDefault(msg, 1, ""), + category: jspb.Message.getFieldWithDefault(msg, 2, ""), + url: jspb.Message.getFieldWithDefault(msg, 3, ""), + archivefilename: jspb.Message.getFieldWithDefault(msg, 4, ""), + checksum: jspb.Message.getFieldWithDefault(msg, 5, ""), + size: jspb.Message.getFieldWithDefault(msg, 6, 0), + name: 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.cc.arduino.cli.commands.BoardPlatform} + */ +proto.cc.arduino.cli.commands.BoardPlatform.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.BoardPlatform; + return proto.cc.arduino.cli.commands.BoardPlatform.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.BoardPlatform} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.BoardPlatform} + */ +proto.cc.arduino.cli.commands.BoardPlatform.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.setArchitecture(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setCategory(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setUrl(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setArchivefilename(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setChecksum(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt64()); + msg.setSize(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.commands.BoardPlatform.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.BoardPlatform.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cc.arduino.cli.commands.BoardPlatform} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.BoardPlatform.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getArchitecture(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getCategory(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getUrl(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getArchivefilename(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getChecksum(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getSize(); + if (f !== 0) { + writer.writeInt64( + 6, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } +}; + + +/** + * optional string architecture = 1; + * @return {string} + */ +proto.cc.arduino.cli.commands.BoardPlatform.prototype.getArchitecture = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.BoardPlatform} returns this + */ +proto.cc.arduino.cli.commands.BoardPlatform.prototype.setArchitecture = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string category = 2; + * @return {string} + */ +proto.cc.arduino.cli.commands.BoardPlatform.prototype.getCategory = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.BoardPlatform} returns this + */ +proto.cc.arduino.cli.commands.BoardPlatform.prototype.setCategory = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string url = 3; + * @return {string} + */ +proto.cc.arduino.cli.commands.BoardPlatform.prototype.getUrl = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.BoardPlatform} returns this + */ +proto.cc.arduino.cli.commands.BoardPlatform.prototype.setUrl = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string archiveFileName = 4; + * @return {string} + */ +proto.cc.arduino.cli.commands.BoardPlatform.prototype.getArchivefilename = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.BoardPlatform} returns this + */ +proto.cc.arduino.cli.commands.BoardPlatform.prototype.setArchivefilename = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string checksum = 5; + * @return {string} + */ +proto.cc.arduino.cli.commands.BoardPlatform.prototype.getChecksum = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.BoardPlatform} returns this + */ +proto.cc.arduino.cli.commands.BoardPlatform.prototype.setChecksum = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional int64 size = 6; + * @return {number} + */ +proto.cc.arduino.cli.commands.BoardPlatform.prototype.getSize = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cc.arduino.cli.commands.BoardPlatform} returns this + */ +proto.cc.arduino.cli.commands.BoardPlatform.prototype.setSize = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * optional string name = 7; + * @return {string} + */ +proto.cc.arduino.cli.commands.BoardPlatform.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.BoardPlatform} returns this + */ +proto.cc.arduino.cli.commands.BoardPlatform.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cc.arduino.cli.commands.ToolsDependencies.repeatedFields_ = [4]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.ToolsDependencies.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.ToolsDependencies.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.ToolsDependencies} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.ToolsDependencies.toObject = function(includeInstance, msg) { + var f, obj = { + packager: jspb.Message.getFieldWithDefault(msg, 1, ""), + name: jspb.Message.getFieldWithDefault(msg, 2, ""), + version: jspb.Message.getFieldWithDefault(msg, 3, ""), + systemsList: jspb.Message.toObjectList(msg.getSystemsList(), + proto.cc.arduino.cli.commands.Systems.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.cc.arduino.cli.commands.ToolsDependencies} + */ +proto.cc.arduino.cli.commands.ToolsDependencies.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.ToolsDependencies; + return proto.cc.arduino.cli.commands.ToolsDependencies.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.ToolsDependencies} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.ToolsDependencies} + */ +proto.cc.arduino.cli.commands.ToolsDependencies.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.setPackager(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; + case 4: + var value = new proto.cc.arduino.cli.commands.Systems; + reader.readMessage(value,proto.cc.arduino.cli.commands.Systems.deserializeBinaryFromReader); + msg.addSystems(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.commands.ToolsDependencies.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.ToolsDependencies.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cc.arduino.cli.commands.ToolsDependencies} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.ToolsDependencies.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPackager(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getVersion(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getSystemsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + proto.cc.arduino.cli.commands.Systems.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string packager = 1; + * @return {string} + */ +proto.cc.arduino.cli.commands.ToolsDependencies.prototype.getPackager = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.ToolsDependencies} returns this + */ +proto.cc.arduino.cli.commands.ToolsDependencies.prototype.setPackager = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string name = 2; + * @return {string} + */ +proto.cc.arduino.cli.commands.ToolsDependencies.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.ToolsDependencies} returns this + */ +proto.cc.arduino.cli.commands.ToolsDependencies.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string version = 3; + * @return {string} + */ +proto.cc.arduino.cli.commands.ToolsDependencies.prototype.getVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.ToolsDependencies} returns this + */ +proto.cc.arduino.cli.commands.ToolsDependencies.prototype.setVersion = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * repeated Systems systems = 4; + * @return {!Array} + */ +proto.cc.arduino.cli.commands.ToolsDependencies.prototype.getSystemsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cc.arduino.cli.commands.Systems, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cc.arduino.cli.commands.ToolsDependencies} returns this +*/ +proto.cc.arduino.cli.commands.ToolsDependencies.prototype.setSystemsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.cc.arduino.cli.commands.Systems=} opt_value + * @param {number=} opt_index + * @return {!proto.cc.arduino.cli.commands.Systems} + */ +proto.cc.arduino.cli.commands.ToolsDependencies.prototype.addSystems = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.cc.arduino.cli.commands.Systems, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cc.arduino.cli.commands.ToolsDependencies} returns this + */ +proto.cc.arduino.cli.commands.ToolsDependencies.prototype.clearSystemsList = function() { + return this.setSystemsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.Systems.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.Systems.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.Systems} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.Systems.toObject = function(includeInstance, msg) { + var f, obj = { + checksum: jspb.Message.getFieldWithDefault(msg, 1, ""), + host: jspb.Message.getFieldWithDefault(msg, 2, ""), + archivefilename: jspb.Message.getFieldWithDefault(msg, 3, ""), + url: jspb.Message.getFieldWithDefault(msg, 4, ""), + size: 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.cc.arduino.cli.commands.Systems} + */ +proto.cc.arduino.cli.commands.Systems.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.Systems; + return proto.cc.arduino.cli.commands.Systems.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.Systems} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.Systems} + */ +proto.cc.arduino.cli.commands.Systems.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.setChecksum(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setHost(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setArchivefilename(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setUrl(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setSize(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.commands.Systems.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.Systems.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cc.arduino.cli.commands.Systems} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.Systems.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getChecksum(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getHost(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getArchivefilename(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getUrl(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getSize(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } +}; + + +/** + * optional string checksum = 1; + * @return {string} + */ +proto.cc.arduino.cli.commands.Systems.prototype.getChecksum = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.Systems} returns this + */ +proto.cc.arduino.cli.commands.Systems.prototype.setChecksum = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string host = 2; + * @return {string} + */ +proto.cc.arduino.cli.commands.Systems.prototype.getHost = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.Systems} returns this + */ +proto.cc.arduino.cli.commands.Systems.prototype.setHost = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string archiveFileName = 3; + * @return {string} + */ +proto.cc.arduino.cli.commands.Systems.prototype.getArchivefilename = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.Systems} returns this + */ +proto.cc.arduino.cli.commands.Systems.prototype.setArchivefilename = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string url = 4; + * @return {string} + */ +proto.cc.arduino.cli.commands.Systems.prototype.getUrl = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.Systems} returns this + */ +proto.cc.arduino.cli.commands.Systems.prototype.setUrl = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional int64 size = 5; + * @return {number} + */ +proto.cc.arduino.cli.commands.Systems.prototype.getSize = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cc.arduino.cli.commands.Systems} returns this + */ +proto.cc.arduino.cli.commands.Systems.prototype.setSize = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cc.arduino.cli.commands.ConfigOption.repeatedFields_ = [3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.ConfigOption.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.ConfigOption.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.ConfigOption} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.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.cc.arduino.cli.commands.ConfigOption} + */ +proto.cc.arduino.cli.commands.ConfigOption.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.ConfigOption; + return proto.cc.arduino.cli.commands.ConfigOption.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.ConfigOption} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.ConfigOption} + */ +proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.ConfigValue; + reader.readMessage(value,proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.ConfigOption.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.ConfigOption} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.ConfigValue.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string option = 1; + * @return {string} + */ +proto.cc.arduino.cli.commands.ConfigOption.prototype.getOption = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.ConfigOption} returns this + */ +proto.cc.arduino.cli.commands.ConfigOption.prototype.setOption = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string option_label = 2; + * @return {string} + */ +proto.cc.arduino.cli.commands.ConfigOption.prototype.getOptionLabel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.ConfigOption} returns this + */ +proto.cc.arduino.cli.commands.ConfigOption.prototype.setOptionLabel = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated ConfigValue values = 3; + * @return {!Array} + */ +proto.cc.arduino.cli.commands.ConfigOption.prototype.getValuesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cc.arduino.cli.commands.ConfigValue, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cc.arduino.cli.commands.ConfigOption} returns this +*/ +proto.cc.arduino.cli.commands.ConfigOption.prototype.setValuesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.cc.arduino.cli.commands.ConfigValue=} opt_value + * @param {number=} opt_index + * @return {!proto.cc.arduino.cli.commands.ConfigValue} + */ +proto.cc.arduino.cli.commands.ConfigOption.prototype.addValues = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.cc.arduino.cli.commands.ConfigValue, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cc.arduino.cli.commands.ConfigOption} returns this + */ +proto.cc.arduino.cli.commands.ConfigOption.prototype.clearValuesList = function() { + return this.setValuesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.ConfigValue.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.ConfigValue.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.ConfigValue} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.ConfigValue.toObject = function(includeInstance, msg) { + var f, obj = { + value: jspb.Message.getFieldWithDefault(msg, 1, ""), + valueLabel: jspb.Message.getFieldWithDefault(msg, 2, ""), + selected: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cc.arduino.cli.commands.ConfigValue} + */ +proto.cc.arduino.cli.commands.ConfigValue.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.ConfigValue; + return proto.cc.arduino.cli.commands.ConfigValue.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.ConfigValue} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.ConfigValue} + */ +proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.ConfigValue.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.ConfigValue} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.ConfigValue.prototype.getValue = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.ConfigValue} returns this + */ +proto.cc.arduino.cli.commands.ConfigValue.prototype.setValue = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string value_label = 2; + * @return {string} + */ +proto.cc.arduino.cli.commands.ConfigValue.prototype.getValueLabel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.ConfigValue} returns this + */ +proto.cc.arduino.cli.commands.ConfigValue.prototype.setValueLabel = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional bool selected = 3; + * @return {boolean} + */ +proto.cc.arduino.cli.commands.ConfigValue.prototype.getSelected = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cc.arduino.cli.commands.ConfigValue} returns this + */ +proto.cc.arduino.cli.commands.ConfigValue.prototype.setSelected = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.BoardAttachReq.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.BoardAttachReq.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.BoardAttachReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.BoardAttachReq.toObject = function(includeInstance, msg) { + var f, obj = { + instance: (f = msg.getInstance()) && commands_common_pb.Instance.toObject(includeInstance, f), + boardUri: jspb.Message.getFieldWithDefault(msg, 2, ""), + sketchPath: jspb.Message.getFieldWithDefault(msg, 3, ""), + searchTimeout: 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.cc.arduino.cli.commands.BoardAttachReq} + */ +proto.cc.arduino.cli.commands.BoardAttachReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.BoardAttachReq; + return proto.cc.arduino.cli.commands.BoardAttachReq.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.BoardAttachReq} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.BoardAttachReq} + */ +proto.cc.arduino.cli.commands.BoardAttachReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new commands_common_pb.Instance; + reader.readMessage(value,commands_common_pb.Instance.deserializeBinaryFromReader); + msg.setInstance(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setBoardUri(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setSketchPath(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setSearchTimeout(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.commands.BoardAttachReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.BoardAttachReq.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cc.arduino.cli.commands.BoardAttachReq} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.BoardAttachReq.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInstance(); + if (f != null) { + writer.writeMessage( + 1, + f, + commands_common_pb.Instance.serializeBinaryToWriter + ); + } + f = message.getBoardUri(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getSketchPath(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getSearchTimeout(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional Instance instance = 1; + * @return {?proto.cc.arduino.cli.commands.Instance} + */ +proto.cc.arduino.cli.commands.BoardAttachReq.prototype.getInstance = function() { + return /** @type{?proto.cc.arduino.cli.commands.Instance} */ ( + jspb.Message.getWrapperField(this, commands_common_pb.Instance, 1)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.Instance|undefined} value + * @return {!proto.cc.arduino.cli.commands.BoardAttachReq} returns this +*/ +proto.cc.arduino.cli.commands.BoardAttachReq.prototype.setInstance = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.BoardAttachReq} returns this + */ +proto.cc.arduino.cli.commands.BoardAttachReq.prototype.clearInstance = function() { + return this.setInstance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.BoardAttachReq.prototype.hasInstance = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string board_uri = 2; + * @return {string} + */ +proto.cc.arduino.cli.commands.BoardAttachReq.prototype.getBoardUri = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.BoardAttachReq} returns this + */ +proto.cc.arduino.cli.commands.BoardAttachReq.prototype.setBoardUri = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string sketch_path = 3; + * @return {string} + */ +proto.cc.arduino.cli.commands.BoardAttachReq.prototype.getSketchPath = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.BoardAttachReq} returns this + */ +proto.cc.arduino.cli.commands.BoardAttachReq.prototype.setSketchPath = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string search_timeout = 4; + * @return {string} + */ +proto.cc.arduino.cli.commands.BoardAttachReq.prototype.getSearchTimeout = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.BoardAttachReq} returns this + */ +proto.cc.arduino.cli.commands.BoardAttachReq.prototype.setSearchTimeout = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.BoardAttachResp.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.BoardAttachResp.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.BoardAttachResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.BoardAttachResp.toObject = function(includeInstance, msg) { + var f, obj = { + taskProgress: (f = msg.getTaskProgress()) && commands_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.cc.arduino.cli.commands.BoardAttachResp} + */ +proto.cc.arduino.cli.commands.BoardAttachResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.BoardAttachResp; + return proto.cc.arduino.cli.commands.BoardAttachResp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.BoardAttachResp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.BoardAttachResp} + */ +proto.cc.arduino.cli.commands.BoardAttachResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new commands_common_pb.TaskProgress; + reader.readMessage(value,commands_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.cc.arduino.cli.commands.BoardAttachResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.BoardAttachResp.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cc.arduino.cli.commands.BoardAttachResp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.BoardAttachResp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTaskProgress(); + if (f != null) { + writer.writeMessage( + 1, + f, + commands_common_pb.TaskProgress.serializeBinaryToWriter + ); + } +}; + + +/** + * optional TaskProgress task_progress = 1; + * @return {?proto.cc.arduino.cli.commands.TaskProgress} + */ +proto.cc.arduino.cli.commands.BoardAttachResp.prototype.getTaskProgress = function() { + return /** @type{?proto.cc.arduino.cli.commands.TaskProgress} */ ( + jspb.Message.getWrapperField(this, commands_common_pb.TaskProgress, 1)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.TaskProgress|undefined} value + * @return {!proto.cc.arduino.cli.commands.BoardAttachResp} returns this +*/ +proto.cc.arduino.cli.commands.BoardAttachResp.prototype.setTaskProgress = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.BoardAttachResp} returns this + */ +proto.cc.arduino.cli.commands.BoardAttachResp.prototype.clearTaskProgress = function() { + return this.setTaskProgress(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.BoardAttachResp.prototype.hasTaskProgress = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.BoardListReq.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.BoardListReq.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.BoardListReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.BoardListReq.toObject = function(includeInstance, msg) { + var f, obj = { + instance: (f = msg.getInstance()) && commands_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.cc.arduino.cli.commands.BoardListReq} + */ +proto.cc.arduino.cli.commands.BoardListReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.BoardListReq; + return proto.cc.arduino.cli.commands.BoardListReq.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.BoardListReq} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.BoardListReq} + */ +proto.cc.arduino.cli.commands.BoardListReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new commands_common_pb.Instance; + reader.readMessage(value,commands_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.cc.arduino.cli.commands.BoardListReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.BoardListReq} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.BoardListReq.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInstance(); + if (f != null) { + writer.writeMessage( + 1, + f, + commands_common_pb.Instance.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Instance instance = 1; + * @return {?proto.cc.arduino.cli.commands.Instance} + */ +proto.cc.arduino.cli.commands.BoardListReq.prototype.getInstance = function() { + return /** @type{?proto.cc.arduino.cli.commands.Instance} */ ( + jspb.Message.getWrapperField(this, commands_common_pb.Instance, 1)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.Instance|undefined} value + * @return {!proto.cc.arduino.cli.commands.BoardListReq} returns this +*/ +proto.cc.arduino.cli.commands.BoardListReq.prototype.setInstance = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.BoardListReq} returns this + */ +proto.cc.arduino.cli.commands.BoardListReq.prototype.clearInstance = function() { + return this.setInstance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.BoardListReq.prototype.hasInstance = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cc.arduino.cli.commands.BoardListResp.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.BoardListResp.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.BoardListResp.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.BoardListResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.BoardListResp.toObject = function(includeInstance, msg) { + var f, obj = { + portsList: jspb.Message.toObjectList(msg.getPortsList(), + proto.cc.arduino.cli.commands.DetectedPort.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.cc.arduino.cli.commands.BoardListResp} + */ +proto.cc.arduino.cli.commands.BoardListResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.BoardListResp; + return proto.cc.arduino.cli.commands.BoardListResp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.BoardListResp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.BoardListResp} + */ +proto.cc.arduino.cli.commands.BoardListResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cc.arduino.cli.commands.DetectedPort; + reader.readMessage(value,proto.cc.arduino.cli.commands.DetectedPort.deserializeBinaryFromReader); + msg.addPorts(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.commands.BoardListResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.BoardListResp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.BoardListResp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPortsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.cc.arduino.cli.commands.DetectedPort.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated DetectedPort ports = 1; + * @return {!Array} + */ +proto.cc.arduino.cli.commands.BoardListResp.prototype.getPortsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cc.arduino.cli.commands.DetectedPort, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cc.arduino.cli.commands.BoardListResp} returns this +*/ +proto.cc.arduino.cli.commands.BoardListResp.prototype.setPortsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cc.arduino.cli.commands.DetectedPort=} opt_value + * @param {number=} opt_index + * @return {!proto.cc.arduino.cli.commands.DetectedPort} + */ +proto.cc.arduino.cli.commands.BoardListResp.prototype.addPorts = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cc.arduino.cli.commands.DetectedPort, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cc.arduino.cli.commands.BoardListResp} returns this + */ +proto.cc.arduino.cli.commands.BoardListResp.prototype.clearPortsList = function() { + return this.setPortsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cc.arduino.cli.commands.DetectedPort.repeatedFields_ = [4]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.DetectedPort.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.DetectedPort.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.DetectedPort} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.DetectedPort.toObject = function(includeInstance, msg) { + var f, obj = { + address: jspb.Message.getFieldWithDefault(msg, 1, ""), + protocol: jspb.Message.getFieldWithDefault(msg, 2, ""), + protocolLabel: jspb.Message.getFieldWithDefault(msg, 3, ""), + boardsList: jspb.Message.toObjectList(msg.getBoardsList(), + proto.cc.arduino.cli.commands.BoardListItem.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.cc.arduino.cli.commands.DetectedPort} + */ +proto.cc.arduino.cli.commands.DetectedPort.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.DetectedPort; + return proto.cc.arduino.cli.commands.DetectedPort.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.DetectedPort} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.DetectedPort} + */ +proto.cc.arduino.cli.commands.DetectedPort.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.setAddress(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setProtocol(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setProtocolLabel(value); + break; + case 4: + var value = new proto.cc.arduino.cli.commands.BoardListItem; + reader.readMessage(value,proto.cc.arduino.cli.commands.BoardListItem.deserializeBinaryFromReader); + msg.addBoards(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.commands.DetectedPort.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.DetectedPort.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cc.arduino.cli.commands.DetectedPort} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.DetectedPort.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getProtocol(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getProtocolLabel(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getBoardsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + proto.cc.arduino.cli.commands.BoardListItem.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string address = 1; + * @return {string} + */ +proto.cc.arduino.cli.commands.DetectedPort.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.DetectedPort} returns this + */ +proto.cc.arduino.cli.commands.DetectedPort.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string protocol = 2; + * @return {string} + */ +proto.cc.arduino.cli.commands.DetectedPort.prototype.getProtocol = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.DetectedPort} returns this + */ +proto.cc.arduino.cli.commands.DetectedPort.prototype.setProtocol = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string protocol_label = 3; + * @return {string} + */ +proto.cc.arduino.cli.commands.DetectedPort.prototype.getProtocolLabel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.DetectedPort} returns this + */ +proto.cc.arduino.cli.commands.DetectedPort.prototype.setProtocolLabel = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * repeated BoardListItem boards = 4; + * @return {!Array} + */ +proto.cc.arduino.cli.commands.DetectedPort.prototype.getBoardsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cc.arduino.cli.commands.BoardListItem, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cc.arduino.cli.commands.DetectedPort} returns this +*/ +proto.cc.arduino.cli.commands.DetectedPort.prototype.setBoardsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.cc.arduino.cli.commands.BoardListItem=} opt_value + * @param {number=} opt_index + * @return {!proto.cc.arduino.cli.commands.BoardListItem} + */ +proto.cc.arduino.cli.commands.DetectedPort.prototype.addBoards = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.cc.arduino.cli.commands.BoardListItem, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cc.arduino.cli.commands.DetectedPort} returns this + */ +proto.cc.arduino.cli.commands.DetectedPort.prototype.clearBoardsList = function() { + return this.setBoardsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cc.arduino.cli.commands.BoardListAllReq.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.BoardListAllReq.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.BoardListAllReq.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.BoardListAllReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.BoardListAllReq.toObject = function(includeInstance, msg) { + var f, obj = { + instance: (f = msg.getInstance()) && commands_common_pb.Instance.toObject(includeInstance, f), + searchArgsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : 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.cc.arduino.cli.commands.BoardListAllReq} + */ +proto.cc.arduino.cli.commands.BoardListAllReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.BoardListAllReq; + return proto.cc.arduino.cli.commands.BoardListAllReq.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.BoardListAllReq} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.BoardListAllReq} + */ +proto.cc.arduino.cli.commands.BoardListAllReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new commands_common_pb.Instance; + reader.readMessage(value,commands_common_pb.Instance.deserializeBinaryFromReader); + msg.setInstance(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.addSearchArgs(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.commands.BoardListAllReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.BoardListAllReq.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cc.arduino.cli.commands.BoardListAllReq} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.BoardListAllReq.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInstance(); + if (f != null) { + writer.writeMessage( + 1, + f, + commands_common_pb.Instance.serializeBinaryToWriter + ); + } + f = message.getSearchArgsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 2, + f + ); + } +}; + + +/** + * optional Instance instance = 1; + * @return {?proto.cc.arduino.cli.commands.Instance} + */ +proto.cc.arduino.cli.commands.BoardListAllReq.prototype.getInstance = function() { + return /** @type{?proto.cc.arduino.cli.commands.Instance} */ ( + jspb.Message.getWrapperField(this, commands_common_pb.Instance, 1)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.Instance|undefined} value + * @return {!proto.cc.arduino.cli.commands.BoardListAllReq} returns this +*/ +proto.cc.arduino.cli.commands.BoardListAllReq.prototype.setInstance = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.BoardListAllReq} returns this + */ +proto.cc.arduino.cli.commands.BoardListAllReq.prototype.clearInstance = function() { + return this.setInstance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.BoardListAllReq.prototype.hasInstance = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated string search_args = 2; + * @return {!Array} + */ +proto.cc.arduino.cli.commands.BoardListAllReq.prototype.getSearchArgsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cc.arduino.cli.commands.BoardListAllReq} returns this + */ +proto.cc.arduino.cli.commands.BoardListAllReq.prototype.setSearchArgsList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.cc.arduino.cli.commands.BoardListAllReq} returns this + */ +proto.cc.arduino.cli.commands.BoardListAllReq.prototype.addSearchArgs = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cc.arduino.cli.commands.BoardListAllReq} returns this + */ +proto.cc.arduino.cli.commands.BoardListAllReq.prototype.clearSearchArgsList = function() { + return this.setSearchArgsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cc.arduino.cli.commands.BoardListAllResp.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.BoardListAllResp.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.BoardListAllResp.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.BoardListAllResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.BoardListAllResp.toObject = function(includeInstance, msg) { + var f, obj = { + boardsList: jspb.Message.toObjectList(msg.getBoardsList(), + proto.cc.arduino.cli.commands.BoardListItem.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.cc.arduino.cli.commands.BoardListAllResp} + */ +proto.cc.arduino.cli.commands.BoardListAllResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.BoardListAllResp; + return proto.cc.arduino.cli.commands.BoardListAllResp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.BoardListAllResp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.BoardListAllResp} + */ +proto.cc.arduino.cli.commands.BoardListAllResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cc.arduino.cli.commands.BoardListItem; + reader.readMessage(value,proto.cc.arduino.cli.commands.BoardListItem.deserializeBinaryFromReader); + msg.addBoards(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.commands.BoardListAllResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.BoardListAllResp.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cc.arduino.cli.commands.BoardListAllResp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.BoardListAllResp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBoardsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.cc.arduino.cli.commands.BoardListItem.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated BoardListItem boards = 1; + * @return {!Array} + */ +proto.cc.arduino.cli.commands.BoardListAllResp.prototype.getBoardsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cc.arduino.cli.commands.BoardListItem, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cc.arduino.cli.commands.BoardListAllResp} returns this +*/ +proto.cc.arduino.cli.commands.BoardListAllResp.prototype.setBoardsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cc.arduino.cli.commands.BoardListItem=} opt_value + * @param {number=} opt_index + * @return {!proto.cc.arduino.cli.commands.BoardListItem} + */ +proto.cc.arduino.cli.commands.BoardListAllResp.prototype.addBoards = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cc.arduino.cli.commands.BoardListItem, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cc.arduino.cli.commands.BoardListAllResp} returns this + */ +proto.cc.arduino.cli.commands.BoardListAllResp.prototype.clearBoardsList = function() { + return this.setBoardsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.BoardListItem.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.BoardListItem.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.BoardListItem} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.BoardListItem.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + 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.cc.arduino.cli.commands.BoardListItem} + */ +proto.cc.arduino.cli.commands.BoardListItem.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.BoardListItem; + return proto.cc.arduino.cli.commands.BoardListItem.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.BoardListItem} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.BoardListItem} + */ +proto.cc.arduino.cli.commands.BoardListItem.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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.commands.BoardListItem.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.BoardListItem.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cc.arduino.cli.commands.BoardListItem} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.BoardListItem.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 + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.cc.arduino.cli.commands.BoardListItem.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.BoardListItem} returns this + */ +proto.cc.arduino.cli.commands.BoardListItem.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string FQBN = 2; + * @return {string} + */ +proto.cc.arduino.cli.commands.BoardListItem.prototype.getFqbn = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.BoardListItem} returns this + */ +proto.cc.arduino.cli.commands.BoardListItem.prototype.setFqbn = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +goog.object.extend(exports, proto.cc.arduino.cli.commands); diff --git a/arduino-ide-extension/src/node/cli-protocol/commands/commands_grpc_pb.d.ts b/arduino-ide-extension/src/node/cli-protocol/commands/commands_grpc_pb.d.ts new file mode 100644 index 00000000..c1ec68ee --- /dev/null +++ b/arduino-ide-extension/src/node/cli-protocol/commands/commands_grpc_pb.d.ts @@ -0,0 +1,460 @@ +// package: cc.arduino.cli.commands +// file: commands/commands.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as grpc from "@grpc/grpc-js"; +import {handleClientStreamingCall} from "@grpc/grpc-js/build/src/server-call"; +import * as commands_commands_pb from "../commands/commands_pb"; +import * as commands_common_pb from "../commands/common_pb"; +import * as commands_board_pb from "../commands/board_pb"; +import * as commands_compile_pb from "../commands/compile_pb"; +import * as commands_core_pb from "../commands/core_pb"; +import * as commands_upload_pb from "../commands/upload_pb"; +import * as commands_lib_pb from "../commands/lib_pb"; + +interface IArduinoCoreService extends grpc.ServiceDefinition { + init: IArduinoCoreService_IInit; + destroy: IArduinoCoreService_IDestroy; + rescan: IArduinoCoreService_IRescan; + updateIndex: IArduinoCoreService_IUpdateIndex; + updateLibrariesIndex: IArduinoCoreService_IUpdateLibrariesIndex; + version: IArduinoCoreService_IVersion; + boardDetails: IArduinoCoreService_IBoardDetails; + boardAttach: IArduinoCoreService_IBoardAttach; + boardList: IArduinoCoreService_IBoardList; + boardListAll: IArduinoCoreService_IBoardListAll; + compile: IArduinoCoreService_ICompile; + platformInstall: IArduinoCoreService_IPlatformInstall; + platformDownload: IArduinoCoreService_IPlatformDownload; + platformUninstall: IArduinoCoreService_IPlatformUninstall; + platformUpgrade: IArduinoCoreService_IPlatformUpgrade; + upload: IArduinoCoreService_IUpload; + listProgrammersAvailableForUpload: IArduinoCoreService_IListProgrammersAvailableForUpload; + burnBootloader: IArduinoCoreService_IBurnBootloader; + platformSearch: IArduinoCoreService_IPlatformSearch; + platformList: IArduinoCoreService_IPlatformList; + libraryDownload: IArduinoCoreService_ILibraryDownload; + libraryInstall: IArduinoCoreService_ILibraryInstall; + libraryUninstall: IArduinoCoreService_ILibraryUninstall; + libraryUpgradeAll: IArduinoCoreService_ILibraryUpgradeAll; + libraryResolveDependencies: IArduinoCoreService_ILibraryResolveDependencies; + librarySearch: IArduinoCoreService_ILibrarySearch; + libraryList: IArduinoCoreService_ILibraryList; +} + +interface IArduinoCoreService_IInit extends grpc.MethodDefinition { + path: string; // "/cc.arduino.cli.commands.ArduinoCore/Init" + requestStream: false; + responseStream: true; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IArduinoCoreService_IDestroy extends grpc.MethodDefinition { + path: string; // "/cc.arduino.cli.commands.ArduinoCore/Destroy" + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IArduinoCoreService_IRescan extends grpc.MethodDefinition { + path: string; // "/cc.arduino.cli.commands.ArduinoCore/Rescan" + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IArduinoCoreService_IUpdateIndex extends grpc.MethodDefinition { + path: string; // "/cc.arduino.cli.commands.ArduinoCore/UpdateIndex" + requestStream: false; + responseStream: true; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IArduinoCoreService_IUpdateLibrariesIndex extends grpc.MethodDefinition { + path: string; // "/cc.arduino.cli.commands.ArduinoCore/UpdateLibrariesIndex" + requestStream: false; + responseStream: true; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IArduinoCoreService_IVersion extends grpc.MethodDefinition { + path: string; // "/cc.arduino.cli.commands.ArduinoCore/Version" + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IArduinoCoreService_IBoardDetails extends grpc.MethodDefinition { + path: string; // "/cc.arduino.cli.commands.ArduinoCore/BoardDetails" + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IArduinoCoreService_IBoardAttach extends grpc.MethodDefinition { + path: string; // "/cc.arduino.cli.commands.ArduinoCore/BoardAttach" + requestStream: false; + responseStream: true; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IArduinoCoreService_IBoardList extends grpc.MethodDefinition { + path: string; // "/cc.arduino.cli.commands.ArduinoCore/BoardList" + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IArduinoCoreService_IBoardListAll extends grpc.MethodDefinition { + path: string; // "/cc.arduino.cli.commands.ArduinoCore/BoardListAll" + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IArduinoCoreService_ICompile extends grpc.MethodDefinition { + path: string; // "/cc.arduino.cli.commands.ArduinoCore/Compile" + requestStream: false; + responseStream: true; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IArduinoCoreService_IPlatformInstall extends grpc.MethodDefinition { + path: string; // "/cc.arduino.cli.commands.ArduinoCore/PlatformInstall" + requestStream: false; + responseStream: true; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IArduinoCoreService_IPlatformDownload extends grpc.MethodDefinition { + path: string; // "/cc.arduino.cli.commands.ArduinoCore/PlatformDownload" + requestStream: false; + responseStream: true; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IArduinoCoreService_IPlatformUninstall extends grpc.MethodDefinition { + path: string; // "/cc.arduino.cli.commands.ArduinoCore/PlatformUninstall" + requestStream: false; + responseStream: true; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IArduinoCoreService_IPlatformUpgrade extends grpc.MethodDefinition { + path: string; // "/cc.arduino.cli.commands.ArduinoCore/PlatformUpgrade" + requestStream: false; + responseStream: true; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IArduinoCoreService_IUpload extends grpc.MethodDefinition { + path: string; // "/cc.arduino.cli.commands.ArduinoCore/Upload" + requestStream: false; + responseStream: true; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IArduinoCoreService_IListProgrammersAvailableForUpload extends grpc.MethodDefinition { + path: string; // "/cc.arduino.cli.commands.ArduinoCore/ListProgrammersAvailableForUpload" + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IArduinoCoreService_IBurnBootloader extends grpc.MethodDefinition { + path: string; // "/cc.arduino.cli.commands.ArduinoCore/BurnBootloader" + requestStream: false; + responseStream: true; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IArduinoCoreService_IPlatformSearch extends grpc.MethodDefinition { + path: string; // "/cc.arduino.cli.commands.ArduinoCore/PlatformSearch" + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IArduinoCoreService_IPlatformList extends grpc.MethodDefinition { + path: string; // "/cc.arduino.cli.commands.ArduinoCore/PlatformList" + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IArduinoCoreService_ILibraryDownload extends grpc.MethodDefinition { + path: string; // "/cc.arduino.cli.commands.ArduinoCore/LibraryDownload" + requestStream: false; + responseStream: true; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IArduinoCoreService_ILibraryInstall extends grpc.MethodDefinition { + path: string; // "/cc.arduino.cli.commands.ArduinoCore/LibraryInstall" + requestStream: false; + responseStream: true; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IArduinoCoreService_ILibraryUninstall extends grpc.MethodDefinition { + path: string; // "/cc.arduino.cli.commands.ArduinoCore/LibraryUninstall" + requestStream: false; + responseStream: true; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IArduinoCoreService_ILibraryUpgradeAll extends grpc.MethodDefinition { + path: string; // "/cc.arduino.cli.commands.ArduinoCore/LibraryUpgradeAll" + requestStream: false; + responseStream: true; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IArduinoCoreService_ILibraryResolveDependencies extends grpc.MethodDefinition { + path: string; // "/cc.arduino.cli.commands.ArduinoCore/LibraryResolveDependencies" + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IArduinoCoreService_ILibrarySearch extends grpc.MethodDefinition { + path: string; // "/cc.arduino.cli.commands.ArduinoCore/LibrarySearch" + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IArduinoCoreService_ILibraryList extends grpc.MethodDefinition { + path: string; // "/cc.arduino.cli.commands.ArduinoCore/LibraryList" + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} + +export const ArduinoCoreService: IArduinoCoreService; + +export interface IArduinoCoreServer { + init: grpc.handleServerStreamingCall; + destroy: grpc.handleUnaryCall; + rescan: grpc.handleUnaryCall; + updateIndex: grpc.handleServerStreamingCall; + updateLibrariesIndex: grpc.handleServerStreamingCall; + version: grpc.handleUnaryCall; + boardDetails: grpc.handleUnaryCall; + boardAttach: grpc.handleServerStreamingCall; + boardList: grpc.handleUnaryCall; + boardListAll: grpc.handleUnaryCall; + compile: grpc.handleServerStreamingCall; + platformInstall: grpc.handleServerStreamingCall; + platformDownload: grpc.handleServerStreamingCall; + platformUninstall: grpc.handleServerStreamingCall; + platformUpgrade: grpc.handleServerStreamingCall; + upload: grpc.handleServerStreamingCall; + listProgrammersAvailableForUpload: grpc.handleUnaryCall; + burnBootloader: grpc.handleServerStreamingCall; + platformSearch: grpc.handleUnaryCall; + platformList: grpc.handleUnaryCall; + libraryDownload: grpc.handleServerStreamingCall; + libraryInstall: grpc.handleServerStreamingCall; + libraryUninstall: grpc.handleServerStreamingCall; + libraryUpgradeAll: grpc.handleServerStreamingCall; + libraryResolveDependencies: grpc.handleUnaryCall; + librarySearch: grpc.handleUnaryCall; + libraryList: grpc.handleUnaryCall; +} + +export interface IArduinoCoreClient { + init(request: commands_commands_pb.InitReq, options?: Partial): grpc.ClientReadableStream; + init(request: commands_commands_pb.InitReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + destroy(request: commands_commands_pb.DestroyReq, callback: (error: grpc.ServiceError | null, response: commands_commands_pb.DestroyResp) => void): grpc.ClientUnaryCall; + destroy(request: commands_commands_pb.DestroyReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_commands_pb.DestroyResp) => void): grpc.ClientUnaryCall; + destroy(request: commands_commands_pb.DestroyReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: commands_commands_pb.DestroyResp) => void): grpc.ClientUnaryCall; + rescan(request: commands_commands_pb.RescanReq, callback: (error: grpc.ServiceError | null, response: commands_commands_pb.RescanResp) => void): grpc.ClientUnaryCall; + rescan(request: commands_commands_pb.RescanReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_commands_pb.RescanResp) => void): grpc.ClientUnaryCall; + rescan(request: commands_commands_pb.RescanReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: commands_commands_pb.RescanResp) => void): grpc.ClientUnaryCall; + updateIndex(request: commands_commands_pb.UpdateIndexReq, options?: Partial): grpc.ClientReadableStream; + updateIndex(request: commands_commands_pb.UpdateIndexReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + updateLibrariesIndex(request: commands_commands_pb.UpdateLibrariesIndexReq, options?: Partial): grpc.ClientReadableStream; + updateLibrariesIndex(request: commands_commands_pb.UpdateLibrariesIndexReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + version(request: commands_commands_pb.VersionReq, callback: (error: grpc.ServiceError | null, response: commands_commands_pb.VersionResp) => void): grpc.ClientUnaryCall; + version(request: commands_commands_pb.VersionReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_commands_pb.VersionResp) => void): grpc.ClientUnaryCall; + version(request: commands_commands_pb.VersionReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: commands_commands_pb.VersionResp) => void): grpc.ClientUnaryCall; + boardDetails(request: commands_board_pb.BoardDetailsReq, callback: (error: grpc.ServiceError | null, response: commands_board_pb.BoardDetailsResp) => void): grpc.ClientUnaryCall; + boardDetails(request: commands_board_pb.BoardDetailsReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_board_pb.BoardDetailsResp) => void): grpc.ClientUnaryCall; + boardDetails(request: commands_board_pb.BoardDetailsReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: commands_board_pb.BoardDetailsResp) => void): grpc.ClientUnaryCall; + boardAttach(request: commands_board_pb.BoardAttachReq, options?: Partial): grpc.ClientReadableStream; + boardAttach(request: commands_board_pb.BoardAttachReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + boardList(request: commands_board_pb.BoardListReq, callback: (error: grpc.ServiceError | null, response: commands_board_pb.BoardListResp) => void): grpc.ClientUnaryCall; + boardList(request: commands_board_pb.BoardListReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_board_pb.BoardListResp) => void): grpc.ClientUnaryCall; + boardList(request: commands_board_pb.BoardListReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: commands_board_pb.BoardListResp) => void): grpc.ClientUnaryCall; + boardListAll(request: commands_board_pb.BoardListAllReq, callback: (error: grpc.ServiceError | null, response: commands_board_pb.BoardListAllResp) => void): grpc.ClientUnaryCall; + boardListAll(request: commands_board_pb.BoardListAllReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_board_pb.BoardListAllResp) => void): grpc.ClientUnaryCall; + boardListAll(request: commands_board_pb.BoardListAllReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: commands_board_pb.BoardListAllResp) => void): grpc.ClientUnaryCall; + compile(request: commands_compile_pb.CompileReq, options?: Partial): grpc.ClientReadableStream; + compile(request: commands_compile_pb.CompileReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + platformInstall(request: commands_core_pb.PlatformInstallReq, options?: Partial): grpc.ClientReadableStream; + platformInstall(request: commands_core_pb.PlatformInstallReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + platformDownload(request: commands_core_pb.PlatformDownloadReq, options?: Partial): grpc.ClientReadableStream; + platformDownload(request: commands_core_pb.PlatformDownloadReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + platformUninstall(request: commands_core_pb.PlatformUninstallReq, options?: Partial): grpc.ClientReadableStream; + platformUninstall(request: commands_core_pb.PlatformUninstallReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + platformUpgrade(request: commands_core_pb.PlatformUpgradeReq, options?: Partial): grpc.ClientReadableStream; + platformUpgrade(request: commands_core_pb.PlatformUpgradeReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + upload(request: commands_upload_pb.UploadReq, options?: Partial): grpc.ClientReadableStream; + upload(request: commands_upload_pb.UploadReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + listProgrammersAvailableForUpload(request: commands_upload_pb.ListProgrammersAvailableForUploadReq, callback: (error: grpc.ServiceError | null, response: commands_upload_pb.ListProgrammersAvailableForUploadResp) => void): grpc.ClientUnaryCall; + listProgrammersAvailableForUpload(request: commands_upload_pb.ListProgrammersAvailableForUploadReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_upload_pb.ListProgrammersAvailableForUploadResp) => void): grpc.ClientUnaryCall; + listProgrammersAvailableForUpload(request: commands_upload_pb.ListProgrammersAvailableForUploadReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: commands_upload_pb.ListProgrammersAvailableForUploadResp) => void): grpc.ClientUnaryCall; + burnBootloader(request: commands_upload_pb.BurnBootloaderReq, options?: Partial): grpc.ClientReadableStream; + burnBootloader(request: commands_upload_pb.BurnBootloaderReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + platformSearch(request: commands_core_pb.PlatformSearchReq, callback: (error: grpc.ServiceError | null, response: commands_core_pb.PlatformSearchResp) => void): grpc.ClientUnaryCall; + platformSearch(request: commands_core_pb.PlatformSearchReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_core_pb.PlatformSearchResp) => void): grpc.ClientUnaryCall; + platformSearch(request: commands_core_pb.PlatformSearchReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: commands_core_pb.PlatformSearchResp) => void): grpc.ClientUnaryCall; + platformList(request: commands_core_pb.PlatformListReq, callback: (error: grpc.ServiceError | null, response: commands_core_pb.PlatformListResp) => void): grpc.ClientUnaryCall; + platformList(request: commands_core_pb.PlatformListReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_core_pb.PlatformListResp) => void): grpc.ClientUnaryCall; + platformList(request: commands_core_pb.PlatformListReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: commands_core_pb.PlatformListResp) => void): grpc.ClientUnaryCall; + libraryDownload(request: commands_lib_pb.LibraryDownloadReq, options?: Partial): grpc.ClientReadableStream; + libraryDownload(request: commands_lib_pb.LibraryDownloadReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + libraryInstall(request: commands_lib_pb.LibraryInstallReq, options?: Partial): grpc.ClientReadableStream; + libraryInstall(request: commands_lib_pb.LibraryInstallReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + libraryUninstall(request: commands_lib_pb.LibraryUninstallReq, options?: Partial): grpc.ClientReadableStream; + libraryUninstall(request: commands_lib_pb.LibraryUninstallReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + libraryUpgradeAll(request: commands_lib_pb.LibraryUpgradeAllReq, options?: Partial): grpc.ClientReadableStream; + libraryUpgradeAll(request: commands_lib_pb.LibraryUpgradeAllReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + libraryResolveDependencies(request: commands_lib_pb.LibraryResolveDependenciesReq, callback: (error: grpc.ServiceError | null, response: commands_lib_pb.LibraryResolveDependenciesResp) => void): grpc.ClientUnaryCall; + libraryResolveDependencies(request: commands_lib_pb.LibraryResolveDependenciesReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_lib_pb.LibraryResolveDependenciesResp) => void): grpc.ClientUnaryCall; + libraryResolveDependencies(request: commands_lib_pb.LibraryResolveDependenciesReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: commands_lib_pb.LibraryResolveDependenciesResp) => void): grpc.ClientUnaryCall; + librarySearch(request: commands_lib_pb.LibrarySearchReq, callback: (error: grpc.ServiceError | null, response: commands_lib_pb.LibrarySearchResp) => void): grpc.ClientUnaryCall; + librarySearch(request: commands_lib_pb.LibrarySearchReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_lib_pb.LibrarySearchResp) => void): grpc.ClientUnaryCall; + librarySearch(request: commands_lib_pb.LibrarySearchReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: commands_lib_pb.LibrarySearchResp) => void): grpc.ClientUnaryCall; + libraryList(request: commands_lib_pb.LibraryListReq, callback: (error: grpc.ServiceError | null, response: commands_lib_pb.LibraryListResp) => void): grpc.ClientUnaryCall; + libraryList(request: commands_lib_pb.LibraryListReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_lib_pb.LibraryListResp) => void): grpc.ClientUnaryCall; + libraryList(request: commands_lib_pb.LibraryListReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: commands_lib_pb.LibraryListResp) => void): grpc.ClientUnaryCall; +} + +export class ArduinoCoreClient extends grpc.Client implements IArduinoCoreClient { + constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); + public init(request: commands_commands_pb.InitReq, options?: Partial): grpc.ClientReadableStream; + public init(request: commands_commands_pb.InitReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + public destroy(request: commands_commands_pb.DestroyReq, callback: (error: grpc.ServiceError | null, response: commands_commands_pb.DestroyResp) => void): grpc.ClientUnaryCall; + public destroy(request: commands_commands_pb.DestroyReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_commands_pb.DestroyResp) => void): grpc.ClientUnaryCall; + public destroy(request: commands_commands_pb.DestroyReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: commands_commands_pb.DestroyResp) => void): grpc.ClientUnaryCall; + public rescan(request: commands_commands_pb.RescanReq, callback: (error: grpc.ServiceError | null, response: commands_commands_pb.RescanResp) => void): grpc.ClientUnaryCall; + public rescan(request: commands_commands_pb.RescanReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_commands_pb.RescanResp) => void): grpc.ClientUnaryCall; + public rescan(request: commands_commands_pb.RescanReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: commands_commands_pb.RescanResp) => void): grpc.ClientUnaryCall; + public updateIndex(request: commands_commands_pb.UpdateIndexReq, options?: Partial): grpc.ClientReadableStream; + public updateIndex(request: commands_commands_pb.UpdateIndexReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + public updateLibrariesIndex(request: commands_commands_pb.UpdateLibrariesIndexReq, options?: Partial): grpc.ClientReadableStream; + public updateLibrariesIndex(request: commands_commands_pb.UpdateLibrariesIndexReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + public version(request: commands_commands_pb.VersionReq, callback: (error: grpc.ServiceError | null, response: commands_commands_pb.VersionResp) => void): grpc.ClientUnaryCall; + public version(request: commands_commands_pb.VersionReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_commands_pb.VersionResp) => void): grpc.ClientUnaryCall; + public version(request: commands_commands_pb.VersionReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: commands_commands_pb.VersionResp) => void): grpc.ClientUnaryCall; + public boardDetails(request: commands_board_pb.BoardDetailsReq, callback: (error: grpc.ServiceError | null, response: commands_board_pb.BoardDetailsResp) => void): grpc.ClientUnaryCall; + public boardDetails(request: commands_board_pb.BoardDetailsReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_board_pb.BoardDetailsResp) => void): grpc.ClientUnaryCall; + public boardDetails(request: commands_board_pb.BoardDetailsReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: commands_board_pb.BoardDetailsResp) => void): grpc.ClientUnaryCall; + public boardAttach(request: commands_board_pb.BoardAttachReq, options?: Partial): grpc.ClientReadableStream; + public boardAttach(request: commands_board_pb.BoardAttachReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + public boardList(request: commands_board_pb.BoardListReq, callback: (error: grpc.ServiceError | null, response: commands_board_pb.BoardListResp) => void): grpc.ClientUnaryCall; + public boardList(request: commands_board_pb.BoardListReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_board_pb.BoardListResp) => void): grpc.ClientUnaryCall; + public boardList(request: commands_board_pb.BoardListReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: commands_board_pb.BoardListResp) => void): grpc.ClientUnaryCall; + public boardListAll(request: commands_board_pb.BoardListAllReq, callback: (error: grpc.ServiceError | null, response: commands_board_pb.BoardListAllResp) => void): grpc.ClientUnaryCall; + public boardListAll(request: commands_board_pb.BoardListAllReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_board_pb.BoardListAllResp) => void): grpc.ClientUnaryCall; + public boardListAll(request: commands_board_pb.BoardListAllReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: commands_board_pb.BoardListAllResp) => void): grpc.ClientUnaryCall; + public compile(request: commands_compile_pb.CompileReq, options?: Partial): grpc.ClientReadableStream; + public compile(request: commands_compile_pb.CompileReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + public platformInstall(request: commands_core_pb.PlatformInstallReq, options?: Partial): grpc.ClientReadableStream; + public platformInstall(request: commands_core_pb.PlatformInstallReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + public platformDownload(request: commands_core_pb.PlatformDownloadReq, options?: Partial): grpc.ClientReadableStream; + public platformDownload(request: commands_core_pb.PlatformDownloadReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + public platformUninstall(request: commands_core_pb.PlatformUninstallReq, options?: Partial): grpc.ClientReadableStream; + public platformUninstall(request: commands_core_pb.PlatformUninstallReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + public platformUpgrade(request: commands_core_pb.PlatformUpgradeReq, options?: Partial): grpc.ClientReadableStream; + public platformUpgrade(request: commands_core_pb.PlatformUpgradeReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + public upload(request: commands_upload_pb.UploadReq, options?: Partial): grpc.ClientReadableStream; + public upload(request: commands_upload_pb.UploadReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + public listProgrammersAvailableForUpload(request: commands_upload_pb.ListProgrammersAvailableForUploadReq, callback: (error: grpc.ServiceError | null, response: commands_upload_pb.ListProgrammersAvailableForUploadResp) => void): grpc.ClientUnaryCall; + public listProgrammersAvailableForUpload(request: commands_upload_pb.ListProgrammersAvailableForUploadReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_upload_pb.ListProgrammersAvailableForUploadResp) => void): grpc.ClientUnaryCall; + public listProgrammersAvailableForUpload(request: commands_upload_pb.ListProgrammersAvailableForUploadReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: commands_upload_pb.ListProgrammersAvailableForUploadResp) => void): grpc.ClientUnaryCall; + public burnBootloader(request: commands_upload_pb.BurnBootloaderReq, options?: Partial): grpc.ClientReadableStream; + public burnBootloader(request: commands_upload_pb.BurnBootloaderReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + public platformSearch(request: commands_core_pb.PlatformSearchReq, callback: (error: grpc.ServiceError | null, response: commands_core_pb.PlatformSearchResp) => void): grpc.ClientUnaryCall; + public platformSearch(request: commands_core_pb.PlatformSearchReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_core_pb.PlatformSearchResp) => void): grpc.ClientUnaryCall; + public platformSearch(request: commands_core_pb.PlatformSearchReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: commands_core_pb.PlatformSearchResp) => void): grpc.ClientUnaryCall; + public platformList(request: commands_core_pb.PlatformListReq, callback: (error: grpc.ServiceError | null, response: commands_core_pb.PlatformListResp) => void): grpc.ClientUnaryCall; + public platformList(request: commands_core_pb.PlatformListReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_core_pb.PlatformListResp) => void): grpc.ClientUnaryCall; + public platformList(request: commands_core_pb.PlatformListReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: commands_core_pb.PlatformListResp) => void): grpc.ClientUnaryCall; + public libraryDownload(request: commands_lib_pb.LibraryDownloadReq, options?: Partial): grpc.ClientReadableStream; + public libraryDownload(request: commands_lib_pb.LibraryDownloadReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + public libraryInstall(request: commands_lib_pb.LibraryInstallReq, options?: Partial): grpc.ClientReadableStream; + public libraryInstall(request: commands_lib_pb.LibraryInstallReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + public libraryUninstall(request: commands_lib_pb.LibraryUninstallReq, options?: Partial): grpc.ClientReadableStream; + public libraryUninstall(request: commands_lib_pb.LibraryUninstallReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + public libraryUpgradeAll(request: commands_lib_pb.LibraryUpgradeAllReq, options?: Partial): grpc.ClientReadableStream; + public libraryUpgradeAll(request: commands_lib_pb.LibraryUpgradeAllReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + public libraryResolveDependencies(request: commands_lib_pb.LibraryResolveDependenciesReq, callback: (error: grpc.ServiceError | null, response: commands_lib_pb.LibraryResolveDependenciesResp) => void): grpc.ClientUnaryCall; + public libraryResolveDependencies(request: commands_lib_pb.LibraryResolveDependenciesReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_lib_pb.LibraryResolveDependenciesResp) => void): grpc.ClientUnaryCall; + public libraryResolveDependencies(request: commands_lib_pb.LibraryResolveDependenciesReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: commands_lib_pb.LibraryResolveDependenciesResp) => void): grpc.ClientUnaryCall; + public librarySearch(request: commands_lib_pb.LibrarySearchReq, callback: (error: grpc.ServiceError | null, response: commands_lib_pb.LibrarySearchResp) => void): grpc.ClientUnaryCall; + public librarySearch(request: commands_lib_pb.LibrarySearchReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_lib_pb.LibrarySearchResp) => void): grpc.ClientUnaryCall; + public librarySearch(request: commands_lib_pb.LibrarySearchReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: commands_lib_pb.LibrarySearchResp) => void): grpc.ClientUnaryCall; + public libraryList(request: commands_lib_pb.LibraryListReq, callback: (error: grpc.ServiceError | null, response: commands_lib_pb.LibraryListResp) => void): grpc.ClientUnaryCall; + public libraryList(request: commands_lib_pb.LibraryListReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_lib_pb.LibraryListResp) => void): grpc.ClientUnaryCall; + public libraryList(request: commands_lib_pb.LibraryListReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: commands_lib_pb.LibraryListResp) => void): grpc.ClientUnaryCall; +} diff --git a/arduino-ide-extension/src/node/cli-protocol/commands/commands_grpc_pb.js b/arduino-ide-extension/src/node/cli-protocol/commands/commands_grpc_pb.js new file mode 100644 index 00000000..10143c42 --- /dev/null +++ b/arduino-ide-extension/src/node/cli-protocol/commands/commands_grpc_pb.js @@ -0,0 +1,959 @@ +// GENERATED CODE -- DO NOT EDIT! + +// Original file comments: +// This file is part of arduino-cli. +// +// Copyright 2020 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 commands_commands_pb = require('../commands/commands_pb.js'); +var commands_common_pb = require('../commands/common_pb.js'); +var commands_board_pb = require('../commands/board_pb.js'); +var commands_compile_pb = require('../commands/compile_pb.js'); +var commands_core_pb = require('../commands/core_pb.js'); +var commands_upload_pb = require('../commands/upload_pb.js'); +var commands_lib_pb = require('../commands/lib_pb.js'); + +function serialize_cc_arduino_cli_commands_BoardAttachReq(arg) { + if (!(arg instanceof commands_board_pb.BoardAttachReq)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.BoardAttachReq'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_BoardAttachReq(buffer_arg) { + return commands_board_pb.BoardAttachReq.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_BoardAttachResp(arg) { + if (!(arg instanceof commands_board_pb.BoardAttachResp)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.BoardAttachResp'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_BoardAttachResp(buffer_arg) { + return commands_board_pb.BoardAttachResp.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_BoardDetailsReq(arg) { + if (!(arg instanceof commands_board_pb.BoardDetailsReq)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.BoardDetailsReq'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_BoardDetailsReq(buffer_arg) { + return commands_board_pb.BoardDetailsReq.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_BoardDetailsResp(arg) { + if (!(arg instanceof commands_board_pb.BoardDetailsResp)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.BoardDetailsResp'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_BoardDetailsResp(buffer_arg) { + return commands_board_pb.BoardDetailsResp.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_BoardListAllReq(arg) { + if (!(arg instanceof commands_board_pb.BoardListAllReq)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.BoardListAllReq'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_BoardListAllReq(buffer_arg) { + return commands_board_pb.BoardListAllReq.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_BoardListAllResp(arg) { + if (!(arg instanceof commands_board_pb.BoardListAllResp)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.BoardListAllResp'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_BoardListAllResp(buffer_arg) { + return commands_board_pb.BoardListAllResp.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_BoardListReq(arg) { + if (!(arg instanceof commands_board_pb.BoardListReq)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.BoardListReq'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_BoardListReq(buffer_arg) { + return commands_board_pb.BoardListReq.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_BoardListResp(arg) { + if (!(arg instanceof commands_board_pb.BoardListResp)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.BoardListResp'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_BoardListResp(buffer_arg) { + return commands_board_pb.BoardListResp.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_BurnBootloaderReq(arg) { + if (!(arg instanceof commands_upload_pb.BurnBootloaderReq)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.BurnBootloaderReq'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_BurnBootloaderReq(buffer_arg) { + return commands_upload_pb.BurnBootloaderReq.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_BurnBootloaderResp(arg) { + if (!(arg instanceof commands_upload_pb.BurnBootloaderResp)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.BurnBootloaderResp'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_BurnBootloaderResp(buffer_arg) { + return commands_upload_pb.BurnBootloaderResp.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_CompileReq(arg) { + if (!(arg instanceof commands_compile_pb.CompileReq)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.CompileReq'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_CompileReq(buffer_arg) { + return commands_compile_pb.CompileReq.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_CompileResp(arg) { + if (!(arg instanceof commands_compile_pb.CompileResp)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.CompileResp'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_CompileResp(buffer_arg) { + return commands_compile_pb.CompileResp.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_DestroyReq(arg) { + if (!(arg instanceof commands_commands_pb.DestroyReq)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.DestroyReq'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_DestroyReq(buffer_arg) { + return commands_commands_pb.DestroyReq.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_DestroyResp(arg) { + if (!(arg instanceof commands_commands_pb.DestroyResp)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.DestroyResp'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_DestroyResp(buffer_arg) { + return commands_commands_pb.DestroyResp.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_InitReq(arg) { + if (!(arg instanceof commands_commands_pb.InitReq)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.InitReq'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_InitReq(buffer_arg) { + return commands_commands_pb.InitReq.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_InitResp(arg) { + if (!(arg instanceof commands_commands_pb.InitResp)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.InitResp'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_InitResp(buffer_arg) { + return commands_commands_pb.InitResp.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_LibraryDownloadReq(arg) { + if (!(arg instanceof commands_lib_pb.LibraryDownloadReq)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.LibraryDownloadReq'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_LibraryDownloadReq(buffer_arg) { + return commands_lib_pb.LibraryDownloadReq.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_LibraryDownloadResp(arg) { + if (!(arg instanceof commands_lib_pb.LibraryDownloadResp)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.LibraryDownloadResp'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_LibraryDownloadResp(buffer_arg) { + return commands_lib_pb.LibraryDownloadResp.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_LibraryInstallReq(arg) { + if (!(arg instanceof commands_lib_pb.LibraryInstallReq)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.LibraryInstallReq'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_LibraryInstallReq(buffer_arg) { + return commands_lib_pb.LibraryInstallReq.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_LibraryInstallResp(arg) { + if (!(arg instanceof commands_lib_pb.LibraryInstallResp)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.LibraryInstallResp'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_LibraryInstallResp(buffer_arg) { + return commands_lib_pb.LibraryInstallResp.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_LibraryListReq(arg) { + if (!(arg instanceof commands_lib_pb.LibraryListReq)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.LibraryListReq'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_LibraryListReq(buffer_arg) { + return commands_lib_pb.LibraryListReq.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_LibraryListResp(arg) { + if (!(arg instanceof commands_lib_pb.LibraryListResp)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.LibraryListResp'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_LibraryListResp(buffer_arg) { + return commands_lib_pb.LibraryListResp.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_LibraryResolveDependenciesReq(arg) { + if (!(arg instanceof commands_lib_pb.LibraryResolveDependenciesReq)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.LibraryResolveDependenciesReq'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_LibraryResolveDependenciesReq(buffer_arg) { + return commands_lib_pb.LibraryResolveDependenciesReq.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_LibraryResolveDependenciesResp(arg) { + if (!(arg instanceof commands_lib_pb.LibraryResolveDependenciesResp)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.LibraryResolveDependenciesResp'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_LibraryResolveDependenciesResp(buffer_arg) { + return commands_lib_pb.LibraryResolveDependenciesResp.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_LibrarySearchReq(arg) { + if (!(arg instanceof commands_lib_pb.LibrarySearchReq)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.LibrarySearchReq'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_LibrarySearchReq(buffer_arg) { + return commands_lib_pb.LibrarySearchReq.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_LibrarySearchResp(arg) { + if (!(arg instanceof commands_lib_pb.LibrarySearchResp)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.LibrarySearchResp'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_LibrarySearchResp(buffer_arg) { + return commands_lib_pb.LibrarySearchResp.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_LibraryUninstallReq(arg) { + if (!(arg instanceof commands_lib_pb.LibraryUninstallReq)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.LibraryUninstallReq'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_LibraryUninstallReq(buffer_arg) { + return commands_lib_pb.LibraryUninstallReq.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_LibraryUninstallResp(arg) { + if (!(arg instanceof commands_lib_pb.LibraryUninstallResp)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.LibraryUninstallResp'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_LibraryUninstallResp(buffer_arg) { + return commands_lib_pb.LibraryUninstallResp.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_LibraryUpgradeAllReq(arg) { + if (!(arg instanceof commands_lib_pb.LibraryUpgradeAllReq)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.LibraryUpgradeAllReq'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_LibraryUpgradeAllReq(buffer_arg) { + return commands_lib_pb.LibraryUpgradeAllReq.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_LibraryUpgradeAllResp(arg) { + if (!(arg instanceof commands_lib_pb.LibraryUpgradeAllResp)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.LibraryUpgradeAllResp'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_LibraryUpgradeAllResp(buffer_arg) { + return commands_lib_pb.LibraryUpgradeAllResp.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_ListProgrammersAvailableForUploadReq(arg) { + if (!(arg instanceof commands_upload_pb.ListProgrammersAvailableForUploadReq)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.ListProgrammersAvailableForUploadReq'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_ListProgrammersAvailableForUploadReq(buffer_arg) { + return commands_upload_pb.ListProgrammersAvailableForUploadReq.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_ListProgrammersAvailableForUploadResp(arg) { + if (!(arg instanceof commands_upload_pb.ListProgrammersAvailableForUploadResp)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.ListProgrammersAvailableForUploadResp'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_ListProgrammersAvailableForUploadResp(buffer_arg) { + return commands_upload_pb.ListProgrammersAvailableForUploadResp.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_PlatformDownloadReq(arg) { + if (!(arg instanceof commands_core_pb.PlatformDownloadReq)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.PlatformDownloadReq'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_PlatformDownloadReq(buffer_arg) { + return commands_core_pb.PlatformDownloadReq.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_PlatformDownloadResp(arg) { + if (!(arg instanceof commands_core_pb.PlatformDownloadResp)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.PlatformDownloadResp'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_PlatformDownloadResp(buffer_arg) { + return commands_core_pb.PlatformDownloadResp.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_PlatformInstallReq(arg) { + if (!(arg instanceof commands_core_pb.PlatformInstallReq)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.PlatformInstallReq'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_PlatformInstallReq(buffer_arg) { + return commands_core_pb.PlatformInstallReq.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_PlatformInstallResp(arg) { + if (!(arg instanceof commands_core_pb.PlatformInstallResp)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.PlatformInstallResp'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_PlatformInstallResp(buffer_arg) { + return commands_core_pb.PlatformInstallResp.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_PlatformListReq(arg) { + if (!(arg instanceof commands_core_pb.PlatformListReq)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.PlatformListReq'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_PlatformListReq(buffer_arg) { + return commands_core_pb.PlatformListReq.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_PlatformListResp(arg) { + if (!(arg instanceof commands_core_pb.PlatformListResp)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.PlatformListResp'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_PlatformListResp(buffer_arg) { + return commands_core_pb.PlatformListResp.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_PlatformSearchReq(arg) { + if (!(arg instanceof commands_core_pb.PlatformSearchReq)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.PlatformSearchReq'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_PlatformSearchReq(buffer_arg) { + return commands_core_pb.PlatformSearchReq.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_PlatformSearchResp(arg) { + if (!(arg instanceof commands_core_pb.PlatformSearchResp)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.PlatformSearchResp'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_PlatformSearchResp(buffer_arg) { + return commands_core_pb.PlatformSearchResp.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_PlatformUninstallReq(arg) { + if (!(arg instanceof commands_core_pb.PlatformUninstallReq)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.PlatformUninstallReq'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_PlatformUninstallReq(buffer_arg) { + return commands_core_pb.PlatformUninstallReq.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_PlatformUninstallResp(arg) { + if (!(arg instanceof commands_core_pb.PlatformUninstallResp)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.PlatformUninstallResp'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_PlatformUninstallResp(buffer_arg) { + return commands_core_pb.PlatformUninstallResp.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_PlatformUpgradeReq(arg) { + if (!(arg instanceof commands_core_pb.PlatformUpgradeReq)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.PlatformUpgradeReq'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_PlatformUpgradeReq(buffer_arg) { + return commands_core_pb.PlatformUpgradeReq.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_PlatformUpgradeResp(arg) { + if (!(arg instanceof commands_core_pb.PlatformUpgradeResp)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.PlatformUpgradeResp'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_PlatformUpgradeResp(buffer_arg) { + return commands_core_pb.PlatformUpgradeResp.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_RescanReq(arg) { + if (!(arg instanceof commands_commands_pb.RescanReq)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.RescanReq'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_RescanReq(buffer_arg) { + return commands_commands_pb.RescanReq.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_RescanResp(arg) { + if (!(arg instanceof commands_commands_pb.RescanResp)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.RescanResp'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_RescanResp(buffer_arg) { + return commands_commands_pb.RescanResp.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_UpdateIndexReq(arg) { + if (!(arg instanceof commands_commands_pb.UpdateIndexReq)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.UpdateIndexReq'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_UpdateIndexReq(buffer_arg) { + return commands_commands_pb.UpdateIndexReq.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_UpdateIndexResp(arg) { + if (!(arg instanceof commands_commands_pb.UpdateIndexResp)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.UpdateIndexResp'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_UpdateIndexResp(buffer_arg) { + return commands_commands_pb.UpdateIndexResp.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_UpdateLibrariesIndexReq(arg) { + if (!(arg instanceof commands_commands_pb.UpdateLibrariesIndexReq)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.UpdateLibrariesIndexReq'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_UpdateLibrariesIndexReq(buffer_arg) { + return commands_commands_pb.UpdateLibrariesIndexReq.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_UpdateLibrariesIndexResp(arg) { + if (!(arg instanceof commands_commands_pb.UpdateLibrariesIndexResp)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.UpdateLibrariesIndexResp'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_UpdateLibrariesIndexResp(buffer_arg) { + return commands_commands_pb.UpdateLibrariesIndexResp.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_UploadReq(arg) { + if (!(arg instanceof commands_upload_pb.UploadReq)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.UploadReq'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_UploadReq(buffer_arg) { + return commands_upload_pb.UploadReq.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_UploadResp(arg) { + if (!(arg instanceof commands_upload_pb.UploadResp)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.UploadResp'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_UploadResp(buffer_arg) { + return commands_upload_pb.UploadResp.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_VersionReq(arg) { + if (!(arg instanceof commands_commands_pb.VersionReq)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.VersionReq'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_VersionReq(buffer_arg) { + return commands_commands_pb.VersionReq.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_VersionResp(arg) { + if (!(arg instanceof commands_commands_pb.VersionResp)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.VersionResp'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_VersionResp(buffer_arg) { + return commands_commands_pb.VersionResp.deserializeBinary(new Uint8Array(buffer_arg)); +} + + +// The main Arduino Platform Service +var ArduinoCoreService = exports['cc.arduino.cli.commands.ArduinoCore'] = { + // Start a new instance of the Arduino Core Service +init: { + path: '/cc.arduino.cli.commands.ArduinoCore/Init', + requestStream: false, + responseStream: true, + requestType: commands_commands_pb.InitReq, + responseType: commands_commands_pb.InitResp, + requestSerialize: serialize_cc_arduino_cli_commands_InitReq, + requestDeserialize: deserialize_cc_arduino_cli_commands_InitReq, + responseSerialize: serialize_cc_arduino_cli_commands_InitResp, + responseDeserialize: deserialize_cc_arduino_cli_commands_InitResp, + }, + // Destroy an instance of the Arduino Core Service +destroy: { + path: '/cc.arduino.cli.commands.ArduinoCore/Destroy', + requestStream: false, + responseStream: false, + requestType: commands_commands_pb.DestroyReq, + responseType: commands_commands_pb.DestroyResp, + requestSerialize: serialize_cc_arduino_cli_commands_DestroyReq, + requestDeserialize: deserialize_cc_arduino_cli_commands_DestroyReq, + responseSerialize: serialize_cc_arduino_cli_commands_DestroyResp, + responseDeserialize: deserialize_cc_arduino_cli_commands_DestroyResp, + }, + // Rescan instance of the Arduino Core Service +rescan: { + path: '/cc.arduino.cli.commands.ArduinoCore/Rescan', + requestStream: false, + responseStream: false, + requestType: commands_commands_pb.RescanReq, + responseType: commands_commands_pb.RescanResp, + requestSerialize: serialize_cc_arduino_cli_commands_RescanReq, + requestDeserialize: deserialize_cc_arduino_cli_commands_RescanReq, + responseSerialize: serialize_cc_arduino_cli_commands_RescanResp, + responseDeserialize: deserialize_cc_arduino_cli_commands_RescanResp, + }, + // Update package index of the Arduino Core Service +updateIndex: { + path: '/cc.arduino.cli.commands.ArduinoCore/UpdateIndex', + requestStream: false, + responseStream: true, + requestType: commands_commands_pb.UpdateIndexReq, + responseType: commands_commands_pb.UpdateIndexResp, + requestSerialize: serialize_cc_arduino_cli_commands_UpdateIndexReq, + requestDeserialize: deserialize_cc_arduino_cli_commands_UpdateIndexReq, + responseSerialize: serialize_cc_arduino_cli_commands_UpdateIndexResp, + responseDeserialize: deserialize_cc_arduino_cli_commands_UpdateIndexResp, + }, + // Update libraries index +updateLibrariesIndex: { + path: '/cc.arduino.cli.commands.ArduinoCore/UpdateLibrariesIndex', + requestStream: false, + responseStream: true, + requestType: commands_commands_pb.UpdateLibrariesIndexReq, + responseType: commands_commands_pb.UpdateLibrariesIndexResp, + requestSerialize: serialize_cc_arduino_cli_commands_UpdateLibrariesIndexReq, + requestDeserialize: deserialize_cc_arduino_cli_commands_UpdateLibrariesIndexReq, + responseSerialize: serialize_cc_arduino_cli_commands_UpdateLibrariesIndexResp, + responseDeserialize: deserialize_cc_arduino_cli_commands_UpdateLibrariesIndexResp, + }, + // Get the version of Arduino CLI in use. +version: { + path: '/cc.arduino.cli.commands.ArduinoCore/Version', + requestStream: false, + responseStream: false, + requestType: commands_commands_pb.VersionReq, + responseType: commands_commands_pb.VersionResp, + requestSerialize: serialize_cc_arduino_cli_commands_VersionReq, + requestDeserialize: deserialize_cc_arduino_cli_commands_VersionReq, + responseSerialize: serialize_cc_arduino_cli_commands_VersionResp, + responseDeserialize: deserialize_cc_arduino_cli_commands_VersionResp, + }, + // BOARD COMMANDS +// -------------- +// +// Requests details about a board +boardDetails: { + path: '/cc.arduino.cli.commands.ArduinoCore/BoardDetails', + requestStream: false, + responseStream: false, + requestType: commands_board_pb.BoardDetailsReq, + responseType: commands_board_pb.BoardDetailsResp, + requestSerialize: serialize_cc_arduino_cli_commands_BoardDetailsReq, + requestDeserialize: deserialize_cc_arduino_cli_commands_BoardDetailsReq, + responseSerialize: serialize_cc_arduino_cli_commands_BoardDetailsResp, + responseDeserialize: deserialize_cc_arduino_cli_commands_BoardDetailsResp, + }, + // Attach a board to a sketch. When the `fqbn` field of a request is not +// provided, the FQBN of the attached board will be used. +boardAttach: { + path: '/cc.arduino.cli.commands.ArduinoCore/BoardAttach', + requestStream: false, + responseStream: true, + requestType: commands_board_pb.BoardAttachReq, + responseType: commands_board_pb.BoardAttachResp, + requestSerialize: serialize_cc_arduino_cli_commands_BoardAttachReq, + requestDeserialize: deserialize_cc_arduino_cli_commands_BoardAttachReq, + responseSerialize: serialize_cc_arduino_cli_commands_BoardAttachResp, + responseDeserialize: deserialize_cc_arduino_cli_commands_BoardAttachResp, + }, + // List the boards currently connected to the computer. +boardList: { + path: '/cc.arduino.cli.commands.ArduinoCore/BoardList', + requestStream: false, + responseStream: false, + requestType: commands_board_pb.BoardListReq, + responseType: commands_board_pb.BoardListResp, + requestSerialize: serialize_cc_arduino_cli_commands_BoardListReq, + requestDeserialize: deserialize_cc_arduino_cli_commands_BoardListReq, + responseSerialize: serialize_cc_arduino_cli_commands_BoardListResp, + responseDeserialize: deserialize_cc_arduino_cli_commands_BoardListResp, + }, + // List all the boards provided by installed platforms. +boardListAll: { + path: '/cc.arduino.cli.commands.ArduinoCore/BoardListAll', + requestStream: false, + responseStream: false, + requestType: commands_board_pb.BoardListAllReq, + responseType: commands_board_pb.BoardListAllResp, + requestSerialize: serialize_cc_arduino_cli_commands_BoardListAllReq, + requestDeserialize: deserialize_cc_arduino_cli_commands_BoardListAllReq, + responseSerialize: serialize_cc_arduino_cli_commands_BoardListAllResp, + responseDeserialize: deserialize_cc_arduino_cli_commands_BoardListAllResp, + }, + // Compile an Arduino sketch. +compile: { + path: '/cc.arduino.cli.commands.ArduinoCore/Compile', + requestStream: false, + responseStream: true, + requestType: commands_compile_pb.CompileReq, + responseType: commands_compile_pb.CompileResp, + requestSerialize: serialize_cc_arduino_cli_commands_CompileReq, + requestDeserialize: deserialize_cc_arduino_cli_commands_CompileReq, + responseSerialize: serialize_cc_arduino_cli_commands_CompileResp, + responseDeserialize: deserialize_cc_arduino_cli_commands_CompileResp, + }, + // Download and install a platform and its tool dependencies. +platformInstall: { + path: '/cc.arduino.cli.commands.ArduinoCore/PlatformInstall', + requestStream: false, + responseStream: true, + requestType: commands_core_pb.PlatformInstallReq, + responseType: commands_core_pb.PlatformInstallResp, + requestSerialize: serialize_cc_arduino_cli_commands_PlatformInstallReq, + requestDeserialize: deserialize_cc_arduino_cli_commands_PlatformInstallReq, + responseSerialize: serialize_cc_arduino_cli_commands_PlatformInstallResp, + responseDeserialize: deserialize_cc_arduino_cli_commands_PlatformInstallResp, + }, + // Download a platform and its tool dependencies to the `staging/packages` +// subdirectory of the data directory. +platformDownload: { + path: '/cc.arduino.cli.commands.ArduinoCore/PlatformDownload', + requestStream: false, + responseStream: true, + requestType: commands_core_pb.PlatformDownloadReq, + responseType: commands_core_pb.PlatformDownloadResp, + requestSerialize: serialize_cc_arduino_cli_commands_PlatformDownloadReq, + requestDeserialize: deserialize_cc_arduino_cli_commands_PlatformDownloadReq, + responseSerialize: serialize_cc_arduino_cli_commands_PlatformDownloadResp, + responseDeserialize: deserialize_cc_arduino_cli_commands_PlatformDownloadResp, + }, + // Uninstall a platform as well as its tool dependencies that are not used by +// other installed platforms. +platformUninstall: { + path: '/cc.arduino.cli.commands.ArduinoCore/PlatformUninstall', + requestStream: false, + responseStream: true, + requestType: commands_core_pb.PlatformUninstallReq, + responseType: commands_core_pb.PlatformUninstallResp, + requestSerialize: serialize_cc_arduino_cli_commands_PlatformUninstallReq, + requestDeserialize: deserialize_cc_arduino_cli_commands_PlatformUninstallReq, + responseSerialize: serialize_cc_arduino_cli_commands_PlatformUninstallResp, + responseDeserialize: deserialize_cc_arduino_cli_commands_PlatformUninstallResp, + }, + // Upgrade an installed platform to the latest version. +platformUpgrade: { + path: '/cc.arduino.cli.commands.ArduinoCore/PlatformUpgrade', + requestStream: false, + responseStream: true, + requestType: commands_core_pb.PlatformUpgradeReq, + responseType: commands_core_pb.PlatformUpgradeResp, + requestSerialize: serialize_cc_arduino_cli_commands_PlatformUpgradeReq, + requestDeserialize: deserialize_cc_arduino_cli_commands_PlatformUpgradeReq, + responseSerialize: serialize_cc_arduino_cli_commands_PlatformUpgradeResp, + responseDeserialize: deserialize_cc_arduino_cli_commands_PlatformUpgradeResp, + }, + // Upload a compiled sketch to an Arduino board. +upload: { + path: '/cc.arduino.cli.commands.ArduinoCore/Upload', + requestStream: false, + responseStream: true, + requestType: commands_upload_pb.UploadReq, + responseType: commands_upload_pb.UploadResp, + requestSerialize: serialize_cc_arduino_cli_commands_UploadReq, + requestDeserialize: deserialize_cc_arduino_cli_commands_UploadReq, + responseSerialize: serialize_cc_arduino_cli_commands_UploadResp, + responseDeserialize: deserialize_cc_arduino_cli_commands_UploadResp, + }, + listProgrammersAvailableForUpload: { + path: '/cc.arduino.cli.commands.ArduinoCore/ListProgrammersAvailableForUpload', + requestStream: false, + responseStream: false, + requestType: commands_upload_pb.ListProgrammersAvailableForUploadReq, + responseType: commands_upload_pb.ListProgrammersAvailableForUploadResp, + requestSerialize: serialize_cc_arduino_cli_commands_ListProgrammersAvailableForUploadReq, + requestDeserialize: deserialize_cc_arduino_cli_commands_ListProgrammersAvailableForUploadReq, + responseSerialize: serialize_cc_arduino_cli_commands_ListProgrammersAvailableForUploadResp, + responseDeserialize: deserialize_cc_arduino_cli_commands_ListProgrammersAvailableForUploadResp, + }, + // Burn bootloader to a board. +burnBootloader: { + path: '/cc.arduino.cli.commands.ArduinoCore/BurnBootloader', + requestStream: false, + responseStream: true, + requestType: commands_upload_pb.BurnBootloaderReq, + responseType: commands_upload_pb.BurnBootloaderResp, + requestSerialize: serialize_cc_arduino_cli_commands_BurnBootloaderReq, + requestDeserialize: deserialize_cc_arduino_cli_commands_BurnBootloaderReq, + responseSerialize: serialize_cc_arduino_cli_commands_BurnBootloaderResp, + responseDeserialize: deserialize_cc_arduino_cli_commands_BurnBootloaderResp, + }, + // Search for a platform in the platforms indexes. +platformSearch: { + path: '/cc.arduino.cli.commands.ArduinoCore/PlatformSearch', + requestStream: false, + responseStream: false, + requestType: commands_core_pb.PlatformSearchReq, + responseType: commands_core_pb.PlatformSearchResp, + requestSerialize: serialize_cc_arduino_cli_commands_PlatformSearchReq, + requestDeserialize: deserialize_cc_arduino_cli_commands_PlatformSearchReq, + responseSerialize: serialize_cc_arduino_cli_commands_PlatformSearchResp, + responseDeserialize: deserialize_cc_arduino_cli_commands_PlatformSearchResp, + }, + // List all installed platforms. +platformList: { + path: '/cc.arduino.cli.commands.ArduinoCore/PlatformList', + requestStream: false, + responseStream: false, + requestType: commands_core_pb.PlatformListReq, + responseType: commands_core_pb.PlatformListResp, + requestSerialize: serialize_cc_arduino_cli_commands_PlatformListReq, + requestDeserialize: deserialize_cc_arduino_cli_commands_PlatformListReq, + responseSerialize: serialize_cc_arduino_cli_commands_PlatformListResp, + responseDeserialize: deserialize_cc_arduino_cli_commands_PlatformListResp, + }, + // Download the archive file of an Arduino library in the libraries index to +// the staging directory. +libraryDownload: { + path: '/cc.arduino.cli.commands.ArduinoCore/LibraryDownload', + requestStream: false, + responseStream: true, + requestType: commands_lib_pb.LibraryDownloadReq, + responseType: commands_lib_pb.LibraryDownloadResp, + requestSerialize: serialize_cc_arduino_cli_commands_LibraryDownloadReq, + requestDeserialize: deserialize_cc_arduino_cli_commands_LibraryDownloadReq, + responseSerialize: serialize_cc_arduino_cli_commands_LibraryDownloadResp, + responseDeserialize: deserialize_cc_arduino_cli_commands_LibraryDownloadResp, + }, + // Download and install an Arduino library from the libraries index. +libraryInstall: { + path: '/cc.arduino.cli.commands.ArduinoCore/LibraryInstall', + requestStream: false, + responseStream: true, + requestType: commands_lib_pb.LibraryInstallReq, + responseType: commands_lib_pb.LibraryInstallResp, + requestSerialize: serialize_cc_arduino_cli_commands_LibraryInstallReq, + requestDeserialize: deserialize_cc_arduino_cli_commands_LibraryInstallReq, + responseSerialize: serialize_cc_arduino_cli_commands_LibraryInstallResp, + responseDeserialize: deserialize_cc_arduino_cli_commands_LibraryInstallResp, + }, + // Uninstall an Arduino library. +libraryUninstall: { + path: '/cc.arduino.cli.commands.ArduinoCore/LibraryUninstall', + requestStream: false, + responseStream: true, + requestType: commands_lib_pb.LibraryUninstallReq, + responseType: commands_lib_pb.LibraryUninstallResp, + requestSerialize: serialize_cc_arduino_cli_commands_LibraryUninstallReq, + requestDeserialize: deserialize_cc_arduino_cli_commands_LibraryUninstallReq, + responseSerialize: serialize_cc_arduino_cli_commands_LibraryUninstallResp, + responseDeserialize: deserialize_cc_arduino_cli_commands_LibraryUninstallResp, + }, + // Upgrade all installed Arduino libraries to the newest version available. +libraryUpgradeAll: { + path: '/cc.arduino.cli.commands.ArduinoCore/LibraryUpgradeAll', + requestStream: false, + responseStream: true, + requestType: commands_lib_pb.LibraryUpgradeAllReq, + responseType: commands_lib_pb.LibraryUpgradeAllResp, + requestSerialize: serialize_cc_arduino_cli_commands_LibraryUpgradeAllReq, + requestDeserialize: deserialize_cc_arduino_cli_commands_LibraryUpgradeAllReq, + responseSerialize: serialize_cc_arduino_cli_commands_LibraryUpgradeAllResp, + responseDeserialize: deserialize_cc_arduino_cli_commands_LibraryUpgradeAllResp, + }, + // List the recursive dependencies of a library, as defined by the `depends` +// field of the library.properties files. +libraryResolveDependencies: { + path: '/cc.arduino.cli.commands.ArduinoCore/LibraryResolveDependencies', + requestStream: false, + responseStream: false, + requestType: commands_lib_pb.LibraryResolveDependenciesReq, + responseType: commands_lib_pb.LibraryResolveDependenciesResp, + requestSerialize: serialize_cc_arduino_cli_commands_LibraryResolveDependenciesReq, + requestDeserialize: deserialize_cc_arduino_cli_commands_LibraryResolveDependenciesReq, + responseSerialize: serialize_cc_arduino_cli_commands_LibraryResolveDependenciesResp, + responseDeserialize: deserialize_cc_arduino_cli_commands_LibraryResolveDependenciesResp, + }, + // Search the Arduino libraries index for libraries. +librarySearch: { + path: '/cc.arduino.cli.commands.ArduinoCore/LibrarySearch', + requestStream: false, + responseStream: false, + requestType: commands_lib_pb.LibrarySearchReq, + responseType: commands_lib_pb.LibrarySearchResp, + requestSerialize: serialize_cc_arduino_cli_commands_LibrarySearchReq, + requestDeserialize: deserialize_cc_arduino_cli_commands_LibrarySearchReq, + responseSerialize: serialize_cc_arduino_cli_commands_LibrarySearchResp, + responseDeserialize: deserialize_cc_arduino_cli_commands_LibrarySearchResp, + }, + // List the installed libraries. +libraryList: { + path: '/cc.arduino.cli.commands.ArduinoCore/LibraryList', + requestStream: false, + responseStream: false, + requestType: commands_lib_pb.LibraryListReq, + responseType: commands_lib_pb.LibraryListResp, + requestSerialize: serialize_cc_arduino_cli_commands_LibraryListReq, + requestDeserialize: deserialize_cc_arduino_cli_commands_LibraryListReq, + responseSerialize: serialize_cc_arduino_cli_commands_LibraryListResp, + responseDeserialize: deserialize_cc_arduino_cli_commands_LibraryListResp, + }, +}; + +// BOOTSTRAP COMMANDS +// ------------------- diff --git a/arduino-ide-extension/src/node/cli-protocol/commands/commands_pb.d.ts b/arduino-ide-extension/src/node/cli-protocol/commands/commands_pb.d.ts new file mode 100644 index 00000000..f6ba9a57 --- /dev/null +++ b/arduino-ide-extension/src/node/cli-protocol/commands/commands_pb.d.ts @@ -0,0 +1,308 @@ +// package: cc.arduino.cli.commands +// file: commands/commands.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; +import * as commands_common_pb from "../commands/common_pb"; +import * as commands_board_pb from "../commands/board_pb"; +import * as commands_compile_pb from "../commands/compile_pb"; +import * as commands_core_pb from "../commands/core_pb"; +import * as commands_upload_pb from "../commands/upload_pb"; +import * as commands_lib_pb from "../commands/lib_pb"; + +export class InitReq extends jspb.Message { + getLibraryManagerOnly(): boolean; + setLibraryManagerOnly(value: boolean): InitReq; + + + 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 = { + libraryManagerOnly: boolean, + } +} + +export class InitResp extends jspb.Message { + + hasInstance(): boolean; + clearInstance(): void; + getInstance(): commands_common_pb.Instance | undefined; + setInstance(value?: commands_common_pb.Instance): InitResp; + + clearPlatformsIndexErrorsList(): void; + getPlatformsIndexErrorsList(): Array; + setPlatformsIndexErrorsList(value: Array): InitResp; + addPlatformsIndexErrors(value: string, index?: number): string; + + getLibrariesIndexError(): string; + setLibrariesIndexError(value: string): InitResp; + + + hasDownloadProgress(): boolean; + clearDownloadProgress(): void; + getDownloadProgress(): commands_common_pb.DownloadProgress | undefined; + setDownloadProgress(value?: commands_common_pb.DownloadProgress): InitResp; + + + hasTaskProgress(): boolean; + clearTaskProgress(): void; + getTaskProgress(): commands_common_pb.TaskProgress | undefined; + setTaskProgress(value?: commands_common_pb.TaskProgress): InitResp; + + + 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?: commands_common_pb.Instance.AsObject, + platformsIndexErrorsList: Array, + librariesIndexError: string, + downloadProgress?: commands_common_pb.DownloadProgress.AsObject, + taskProgress?: commands_common_pb.TaskProgress.AsObject, + } +} + +export class DestroyReq extends jspb.Message { + + hasInstance(): boolean; + clearInstance(): void; + getInstance(): commands_common_pb.Instance | undefined; + setInstance(value?: commands_common_pb.Instance): DestroyReq; + + + 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?: commands_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(): commands_common_pb.Instance | undefined; + setInstance(value?: commands_common_pb.Instance): RescanReq; + + + 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?: commands_common_pb.Instance.AsObject, + } +} + +export class RescanResp extends jspb.Message { + clearPlatformsIndexErrorsList(): void; + getPlatformsIndexErrorsList(): Array; + setPlatformsIndexErrorsList(value: Array): RescanResp; + addPlatformsIndexErrors(value: string, index?: number): string; + + getLibrariesIndexError(): string; + setLibrariesIndexError(value: string): RescanResp; + + + 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(): commands_common_pb.Instance | undefined; + setInstance(value?: commands_common_pb.Instance): UpdateIndexReq; + + + 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?: commands_common_pb.Instance.AsObject, + } +} + +export class UpdateIndexResp extends jspb.Message { + + hasDownloadProgress(): boolean; + clearDownloadProgress(): void; + getDownloadProgress(): commands_common_pb.DownloadProgress | undefined; + setDownloadProgress(value?: commands_common_pb.DownloadProgress): UpdateIndexResp; + + + 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?: commands_common_pb.DownloadProgress.AsObject, + } +} + +export class UpdateLibrariesIndexReq extends jspb.Message { + + hasInstance(): boolean; + clearInstance(): void; + getInstance(): commands_common_pb.Instance | undefined; + setInstance(value?: commands_common_pb.Instance): UpdateLibrariesIndexReq; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UpdateLibrariesIndexReq.AsObject; + static toObject(includeInstance: boolean, msg: UpdateLibrariesIndexReq): UpdateLibrariesIndexReq.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UpdateLibrariesIndexReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UpdateLibrariesIndexReq; + static deserializeBinaryFromReader(message: UpdateLibrariesIndexReq, reader: jspb.BinaryReader): UpdateLibrariesIndexReq; +} + +export namespace UpdateLibrariesIndexReq { + export type AsObject = { + instance?: commands_common_pb.Instance.AsObject, + } +} + +export class UpdateLibrariesIndexResp extends jspb.Message { + + hasDownloadProgress(): boolean; + clearDownloadProgress(): void; + getDownloadProgress(): commands_common_pb.DownloadProgress | undefined; + setDownloadProgress(value?: commands_common_pb.DownloadProgress): UpdateLibrariesIndexResp; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UpdateLibrariesIndexResp.AsObject; + static toObject(includeInstance: boolean, msg: UpdateLibrariesIndexResp): UpdateLibrariesIndexResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UpdateLibrariesIndexResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UpdateLibrariesIndexResp; + static deserializeBinaryFromReader(message: UpdateLibrariesIndexResp, reader: jspb.BinaryReader): UpdateLibrariesIndexResp; +} + +export namespace UpdateLibrariesIndexResp { + export type AsObject = { + downloadProgress?: commands_common_pb.DownloadProgress.AsObject, + } +} + +export class VersionReq extends jspb.Message { + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): VersionReq.AsObject; + static toObject(includeInstance: boolean, msg: VersionReq): VersionReq.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: VersionReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): VersionReq; + static deserializeBinaryFromReader(message: VersionReq, reader: jspb.BinaryReader): VersionReq; +} + +export namespace VersionReq { + export type AsObject = { + } +} + +export class VersionResp extends jspb.Message { + getVersion(): string; + setVersion(value: string): VersionResp; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): VersionResp.AsObject; + static toObject(includeInstance: boolean, msg: VersionResp): VersionResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: VersionResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): VersionResp; + static deserializeBinaryFromReader(message: VersionResp, reader: jspb.BinaryReader): VersionResp; +} + +export namespace VersionResp { + export type AsObject = { + version: string, + } +} diff --git a/arduino-ide-extension/src/node/cli-protocol/commands/commands_pb.js b/arduino-ide-extension/src/node/cli-protocol/commands/commands_pb.js new file mode 100644 index 00000000..73bc5cfb --- /dev/null +++ b/arduino-ide-extension/src/node/cli-protocol/commands/commands_pb.js @@ -0,0 +1,2184 @@ +// source: commands/commands.proto +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var commands_common_pb = require('../commands/common_pb.js'); +goog.object.extend(proto, commands_common_pb); +var commands_board_pb = require('../commands/board_pb.js'); +goog.object.extend(proto, commands_board_pb); +var commands_compile_pb = require('../commands/compile_pb.js'); +goog.object.extend(proto, commands_compile_pb); +var commands_core_pb = require('../commands/core_pb.js'); +goog.object.extend(proto, commands_core_pb); +var commands_upload_pb = require('../commands/upload_pb.js'); +goog.object.extend(proto, commands_upload_pb); +var commands_lib_pb = require('../commands/lib_pb.js'); +goog.object.extend(proto, commands_lib_pb); +goog.exportSymbol('proto.cc.arduino.cli.commands.DestroyReq', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.DestroyResp', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.InitReq', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.InitResp', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.RescanReq', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.RescanResp', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.UpdateIndexReq', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.UpdateIndexResp', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.UpdateLibrariesIndexReq', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.UpdateLibrariesIndexResp', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.VersionReq', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.VersionResp', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.InitReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.InitReq, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.InitReq.displayName = 'proto.cc.arduino.cli.commands.InitReq'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.InitResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cc.arduino.cli.commands.InitResp.repeatedFields_, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.InitResp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.InitResp.displayName = 'proto.cc.arduino.cli.commands.InitResp'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.DestroyReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.DestroyReq, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.DestroyReq.displayName = 'proto.cc.arduino.cli.commands.DestroyReq'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.DestroyResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.DestroyResp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.DestroyResp.displayName = 'proto.cc.arduino.cli.commands.DestroyResp'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.RescanReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.RescanReq, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.RescanReq.displayName = 'proto.cc.arduino.cli.commands.RescanReq'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.RescanResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cc.arduino.cli.commands.RescanResp.repeatedFields_, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.RescanResp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.RescanResp.displayName = 'proto.cc.arduino.cli.commands.RescanResp'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.UpdateIndexReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.UpdateIndexReq, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.UpdateIndexReq.displayName = 'proto.cc.arduino.cli.commands.UpdateIndexReq'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.UpdateIndexResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.UpdateIndexResp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.UpdateIndexResp.displayName = 'proto.cc.arduino.cli.commands.UpdateIndexResp'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.UpdateLibrariesIndexReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.UpdateLibrariesIndexReq, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.UpdateLibrariesIndexReq.displayName = 'proto.cc.arduino.cli.commands.UpdateLibrariesIndexReq'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.UpdateLibrariesIndexResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.UpdateLibrariesIndexResp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.UpdateLibrariesIndexResp.displayName = 'proto.cc.arduino.cli.commands.UpdateLibrariesIndexResp'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.VersionReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.VersionReq, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.VersionReq.displayName = 'proto.cc.arduino.cli.commands.VersionReq'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.VersionResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.VersionResp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.VersionResp.displayName = 'proto.cc.arduino.cli.commands.VersionResp'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.InitReq.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.InitReq.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.InitReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.InitReq.toObject = function(includeInstance, msg) { + var f, obj = { + libraryManagerOnly: jspb.Message.getBooleanFieldWithDefault(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.cc.arduino.cli.commands.InitReq} + */ +proto.cc.arduino.cli.commands.InitReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.InitReq; + return proto.cc.arduino.cli.commands.InitReq.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.InitReq} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.InitReq} + */ +proto.cc.arduino.cli.commands.InitReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + 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.cc.arduino.cli.commands.InitReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.InitReq} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.InitReq.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLibraryManagerOnly(); + if (f) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * optional bool library_manager_only = 2; + * @return {boolean} + */ +proto.cc.arduino.cli.commands.InitReq.prototype.getLibraryManagerOnly = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cc.arduino.cli.commands.InitReq} returns this + */ +proto.cc.arduino.cli.commands.InitReq.prototype.setLibraryManagerOnly = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cc.arduino.cli.commands.InitResp.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.InitResp.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.InitResp.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.InitResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.InitResp.toObject = function(includeInstance, msg) { + var f, obj = { + instance: (f = msg.getInstance()) && commands_common_pb.Instance.toObject(includeInstance, f), + platformsIndexErrorsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f, + librariesIndexError: jspb.Message.getFieldWithDefault(msg, 3, ""), + downloadProgress: (f = msg.getDownloadProgress()) && commands_common_pb.DownloadProgress.toObject(includeInstance, f), + taskProgress: (f = msg.getTaskProgress()) && commands_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.cc.arduino.cli.commands.InitResp} + */ +proto.cc.arduino.cli.commands.InitResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.InitResp; + return proto.cc.arduino.cli.commands.InitResp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.InitResp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.InitResp} + */ +proto.cc.arduino.cli.commands.InitResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new commands_common_pb.Instance; + reader.readMessage(value,commands_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; + case 4: + var value = new commands_common_pb.DownloadProgress; + reader.readMessage(value,commands_common_pb.DownloadProgress.deserializeBinaryFromReader); + msg.setDownloadProgress(value); + break; + case 5: + var value = new commands_common_pb.TaskProgress; + reader.readMessage(value,commands_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.cc.arduino.cli.commands.InitResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.InitResp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.InitResp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInstance(); + if (f != null) { + writer.writeMessage( + 1, + f, + commands_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 + ); + } + f = message.getDownloadProgress(); + if (f != null) { + writer.writeMessage( + 4, + f, + commands_common_pb.DownloadProgress.serializeBinaryToWriter + ); + } + f = message.getTaskProgress(); + if (f != null) { + writer.writeMessage( + 5, + f, + commands_common_pb.TaskProgress.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Instance instance = 1; + * @return {?proto.cc.arduino.cli.commands.Instance} + */ +proto.cc.arduino.cli.commands.InitResp.prototype.getInstance = function() { + return /** @type{?proto.cc.arduino.cli.commands.Instance} */ ( + jspb.Message.getWrapperField(this, commands_common_pb.Instance, 1)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.Instance|undefined} value + * @return {!proto.cc.arduino.cli.commands.InitResp} returns this +*/ +proto.cc.arduino.cli.commands.InitResp.prototype.setInstance = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.InitResp} returns this + */ +proto.cc.arduino.cli.commands.InitResp.prototype.clearInstance = function() { + return this.setInstance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.InitResp.prototype.hasInstance = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated string platforms_index_errors = 2; + * @return {!Array} + */ +proto.cc.arduino.cli.commands.InitResp.prototype.getPlatformsIndexErrorsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cc.arduino.cli.commands.InitResp} returns this + */ +proto.cc.arduino.cli.commands.InitResp.prototype.setPlatformsIndexErrorsList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.cc.arduino.cli.commands.InitResp} returns this + */ +proto.cc.arduino.cli.commands.InitResp.prototype.addPlatformsIndexErrors = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cc.arduino.cli.commands.InitResp} returns this + */ +proto.cc.arduino.cli.commands.InitResp.prototype.clearPlatformsIndexErrorsList = function() { + return this.setPlatformsIndexErrorsList([]); +}; + + +/** + * optional string libraries_index_error = 3; + * @return {string} + */ +proto.cc.arduino.cli.commands.InitResp.prototype.getLibrariesIndexError = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.InitResp} returns this + */ +proto.cc.arduino.cli.commands.InitResp.prototype.setLibrariesIndexError = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional DownloadProgress download_progress = 4; + * @return {?proto.cc.arduino.cli.commands.DownloadProgress} + */ +proto.cc.arduino.cli.commands.InitResp.prototype.getDownloadProgress = function() { + return /** @type{?proto.cc.arduino.cli.commands.DownloadProgress} */ ( + jspb.Message.getWrapperField(this, commands_common_pb.DownloadProgress, 4)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.DownloadProgress|undefined} value + * @return {!proto.cc.arduino.cli.commands.InitResp} returns this +*/ +proto.cc.arduino.cli.commands.InitResp.prototype.setDownloadProgress = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.InitResp} returns this + */ +proto.cc.arduino.cli.commands.InitResp.prototype.clearDownloadProgress = function() { + return this.setDownloadProgress(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.InitResp.prototype.hasDownloadProgress = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional TaskProgress task_progress = 5; + * @return {?proto.cc.arduino.cli.commands.TaskProgress} + */ +proto.cc.arduino.cli.commands.InitResp.prototype.getTaskProgress = function() { + return /** @type{?proto.cc.arduino.cli.commands.TaskProgress} */ ( + jspb.Message.getWrapperField(this, commands_common_pb.TaskProgress, 5)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.TaskProgress|undefined} value + * @return {!proto.cc.arduino.cli.commands.InitResp} returns this +*/ +proto.cc.arduino.cli.commands.InitResp.prototype.setTaskProgress = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.InitResp} returns this + */ +proto.cc.arduino.cli.commands.InitResp.prototype.clearTaskProgress = function() { + return this.setTaskProgress(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.InitResp.prototype.hasTaskProgress = function() { + return jspb.Message.getField(this, 5) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.DestroyReq.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.DestroyReq.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.DestroyReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.DestroyReq.toObject = function(includeInstance, msg) { + var f, obj = { + instance: (f = msg.getInstance()) && commands_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.cc.arduino.cli.commands.DestroyReq} + */ +proto.cc.arduino.cli.commands.DestroyReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.DestroyReq; + return proto.cc.arduino.cli.commands.DestroyReq.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.DestroyReq} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.DestroyReq} + */ +proto.cc.arduino.cli.commands.DestroyReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new commands_common_pb.Instance; + reader.readMessage(value,commands_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.cc.arduino.cli.commands.DestroyReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.DestroyReq} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.DestroyReq.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInstance(); + if (f != null) { + writer.writeMessage( + 1, + f, + commands_common_pb.Instance.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Instance instance = 1; + * @return {?proto.cc.arduino.cli.commands.Instance} + */ +proto.cc.arduino.cli.commands.DestroyReq.prototype.getInstance = function() { + return /** @type{?proto.cc.arduino.cli.commands.Instance} */ ( + jspb.Message.getWrapperField(this, commands_common_pb.Instance, 1)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.Instance|undefined} value + * @return {!proto.cc.arduino.cli.commands.DestroyReq} returns this +*/ +proto.cc.arduino.cli.commands.DestroyReq.prototype.setInstance = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.DestroyReq} returns this + */ +proto.cc.arduino.cli.commands.DestroyReq.prototype.clearInstance = function() { + return this.setInstance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.DestroyReq.prototype.hasInstance = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.DestroyResp.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.DestroyResp.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.DestroyResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.DestroyResp} + */ +proto.cc.arduino.cli.commands.DestroyResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.DestroyResp; + return proto.cc.arduino.cli.commands.DestroyResp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.DestroyResp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.DestroyResp} + */ +proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.DestroyResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.DestroyResp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.DestroyResp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.RescanReq.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.RescanReq.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.RescanReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.RescanReq.toObject = function(includeInstance, msg) { + var f, obj = { + instance: (f = msg.getInstance()) && commands_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.cc.arduino.cli.commands.RescanReq} + */ +proto.cc.arduino.cli.commands.RescanReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.RescanReq; + return proto.cc.arduino.cli.commands.RescanReq.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.RescanReq} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.RescanReq} + */ +proto.cc.arduino.cli.commands.RescanReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new commands_common_pb.Instance; + reader.readMessage(value,commands_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.cc.arduino.cli.commands.RescanReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.RescanReq} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.RescanReq.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInstance(); + if (f != null) { + writer.writeMessage( + 1, + f, + commands_common_pb.Instance.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Instance instance = 1; + * @return {?proto.cc.arduino.cli.commands.Instance} + */ +proto.cc.arduino.cli.commands.RescanReq.prototype.getInstance = function() { + return /** @type{?proto.cc.arduino.cli.commands.Instance} */ ( + jspb.Message.getWrapperField(this, commands_common_pb.Instance, 1)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.Instance|undefined} value + * @return {!proto.cc.arduino.cli.commands.RescanReq} returns this +*/ +proto.cc.arduino.cli.commands.RescanReq.prototype.setInstance = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.RescanReq} returns this + */ +proto.cc.arduino.cli.commands.RescanReq.prototype.clearInstance = function() { + return this.setInstance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.RescanReq.prototype.hasInstance = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cc.arduino.cli.commands.RescanResp.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.RescanResp.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.RescanResp.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.RescanResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.RescanResp.toObject = function(includeInstance, msg) { + var f, obj = { + platformsIndexErrorsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f, + 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.cc.arduino.cli.commands.RescanResp} + */ +proto.cc.arduino.cli.commands.RescanResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.RescanResp; + return proto.cc.arduino.cli.commands.RescanResp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.RescanResp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.RescanResp} + */ +proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.RescanResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.RescanResp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.RescanResp.prototype.getPlatformsIndexErrorsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cc.arduino.cli.commands.RescanResp} returns this + */ +proto.cc.arduino.cli.commands.RescanResp.prototype.setPlatformsIndexErrorsList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.cc.arduino.cli.commands.RescanResp} returns this + */ +proto.cc.arduino.cli.commands.RescanResp.prototype.addPlatformsIndexErrors = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cc.arduino.cli.commands.RescanResp} returns this + */ +proto.cc.arduino.cli.commands.RescanResp.prototype.clearPlatformsIndexErrorsList = function() { + return this.setPlatformsIndexErrorsList([]); +}; + + +/** + * optional string libraries_index_error = 2; + * @return {string} + */ +proto.cc.arduino.cli.commands.RescanResp.prototype.getLibrariesIndexError = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.RescanResp} returns this + */ +proto.cc.arduino.cli.commands.RescanResp.prototype.setLibrariesIndexError = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.UpdateIndexReq.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.UpdateIndexReq.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.UpdateIndexReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.UpdateIndexReq.toObject = function(includeInstance, msg) { + var f, obj = { + instance: (f = msg.getInstance()) && commands_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.cc.arduino.cli.commands.UpdateIndexReq} + */ +proto.cc.arduino.cli.commands.UpdateIndexReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.UpdateIndexReq; + return proto.cc.arduino.cli.commands.UpdateIndexReq.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.UpdateIndexReq} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.UpdateIndexReq} + */ +proto.cc.arduino.cli.commands.UpdateIndexReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new commands_common_pb.Instance; + reader.readMessage(value,commands_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.cc.arduino.cli.commands.UpdateIndexReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.UpdateIndexReq} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.UpdateIndexReq.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInstance(); + if (f != null) { + writer.writeMessage( + 1, + f, + commands_common_pb.Instance.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Instance instance = 1; + * @return {?proto.cc.arduino.cli.commands.Instance} + */ +proto.cc.arduino.cli.commands.UpdateIndexReq.prototype.getInstance = function() { + return /** @type{?proto.cc.arduino.cli.commands.Instance} */ ( + jspb.Message.getWrapperField(this, commands_common_pb.Instance, 1)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.Instance|undefined} value + * @return {!proto.cc.arduino.cli.commands.UpdateIndexReq} returns this +*/ +proto.cc.arduino.cli.commands.UpdateIndexReq.prototype.setInstance = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.UpdateIndexReq} returns this + */ +proto.cc.arduino.cli.commands.UpdateIndexReq.prototype.clearInstance = function() { + return this.setInstance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.UpdateIndexReq.prototype.hasInstance = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.UpdateIndexResp.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.UpdateIndexResp.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.UpdateIndexResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.UpdateIndexResp.toObject = function(includeInstance, msg) { + var f, obj = { + downloadProgress: (f = msg.getDownloadProgress()) && commands_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.cc.arduino.cli.commands.UpdateIndexResp} + */ +proto.cc.arduino.cli.commands.UpdateIndexResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.UpdateIndexResp; + return proto.cc.arduino.cli.commands.UpdateIndexResp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.UpdateIndexResp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.UpdateIndexResp} + */ +proto.cc.arduino.cli.commands.UpdateIndexResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new commands_common_pb.DownloadProgress; + reader.readMessage(value,commands_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.cc.arduino.cli.commands.UpdateIndexResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.UpdateIndexResp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.UpdateIndexResp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDownloadProgress(); + if (f != null) { + writer.writeMessage( + 1, + f, + commands_common_pb.DownloadProgress.serializeBinaryToWriter + ); + } +}; + + +/** + * optional DownloadProgress download_progress = 1; + * @return {?proto.cc.arduino.cli.commands.DownloadProgress} + */ +proto.cc.arduino.cli.commands.UpdateIndexResp.prototype.getDownloadProgress = function() { + return /** @type{?proto.cc.arduino.cli.commands.DownloadProgress} */ ( + jspb.Message.getWrapperField(this, commands_common_pb.DownloadProgress, 1)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.DownloadProgress|undefined} value + * @return {!proto.cc.arduino.cli.commands.UpdateIndexResp} returns this +*/ +proto.cc.arduino.cli.commands.UpdateIndexResp.prototype.setDownloadProgress = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.UpdateIndexResp} returns this + */ +proto.cc.arduino.cli.commands.UpdateIndexResp.prototype.clearDownloadProgress = function() { + return this.setDownloadProgress(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.UpdateIndexResp.prototype.hasDownloadProgress = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.UpdateLibrariesIndexReq.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.UpdateLibrariesIndexReq.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.UpdateLibrariesIndexReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.UpdateLibrariesIndexReq.toObject = function(includeInstance, msg) { + var f, obj = { + instance: (f = msg.getInstance()) && commands_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.cc.arduino.cli.commands.UpdateLibrariesIndexReq} + */ +proto.cc.arduino.cli.commands.UpdateLibrariesIndexReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.UpdateLibrariesIndexReq; + return proto.cc.arduino.cli.commands.UpdateLibrariesIndexReq.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.UpdateLibrariesIndexReq} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.UpdateLibrariesIndexReq} + */ +proto.cc.arduino.cli.commands.UpdateLibrariesIndexReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new commands_common_pb.Instance; + reader.readMessage(value,commands_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.cc.arduino.cli.commands.UpdateLibrariesIndexReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.UpdateLibrariesIndexReq.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cc.arduino.cli.commands.UpdateLibrariesIndexReq} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.UpdateLibrariesIndexReq.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInstance(); + if (f != null) { + writer.writeMessage( + 1, + f, + commands_common_pb.Instance.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Instance instance = 1; + * @return {?proto.cc.arduino.cli.commands.Instance} + */ +proto.cc.arduino.cli.commands.UpdateLibrariesIndexReq.prototype.getInstance = function() { + return /** @type{?proto.cc.arduino.cli.commands.Instance} */ ( + jspb.Message.getWrapperField(this, commands_common_pb.Instance, 1)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.Instance|undefined} value + * @return {!proto.cc.arduino.cli.commands.UpdateLibrariesIndexReq} returns this +*/ +proto.cc.arduino.cli.commands.UpdateLibrariesIndexReq.prototype.setInstance = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.UpdateLibrariesIndexReq} returns this + */ +proto.cc.arduino.cli.commands.UpdateLibrariesIndexReq.prototype.clearInstance = function() { + return this.setInstance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.UpdateLibrariesIndexReq.prototype.hasInstance = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.UpdateLibrariesIndexResp.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.UpdateLibrariesIndexResp.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.UpdateLibrariesIndexResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.UpdateLibrariesIndexResp.toObject = function(includeInstance, msg) { + var f, obj = { + downloadProgress: (f = msg.getDownloadProgress()) && commands_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.cc.arduino.cli.commands.UpdateLibrariesIndexResp} + */ +proto.cc.arduino.cli.commands.UpdateLibrariesIndexResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.UpdateLibrariesIndexResp; + return proto.cc.arduino.cli.commands.UpdateLibrariesIndexResp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.UpdateLibrariesIndexResp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.UpdateLibrariesIndexResp} + */ +proto.cc.arduino.cli.commands.UpdateLibrariesIndexResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new commands_common_pb.DownloadProgress; + reader.readMessage(value,commands_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.cc.arduino.cli.commands.UpdateLibrariesIndexResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.UpdateLibrariesIndexResp.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cc.arduino.cli.commands.UpdateLibrariesIndexResp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.UpdateLibrariesIndexResp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDownloadProgress(); + if (f != null) { + writer.writeMessage( + 1, + f, + commands_common_pb.DownloadProgress.serializeBinaryToWriter + ); + } +}; + + +/** + * optional DownloadProgress download_progress = 1; + * @return {?proto.cc.arduino.cli.commands.DownloadProgress} + */ +proto.cc.arduino.cli.commands.UpdateLibrariesIndexResp.prototype.getDownloadProgress = function() { + return /** @type{?proto.cc.arduino.cli.commands.DownloadProgress} */ ( + jspb.Message.getWrapperField(this, commands_common_pb.DownloadProgress, 1)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.DownloadProgress|undefined} value + * @return {!proto.cc.arduino.cli.commands.UpdateLibrariesIndexResp} returns this +*/ +proto.cc.arduino.cli.commands.UpdateLibrariesIndexResp.prototype.setDownloadProgress = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.UpdateLibrariesIndexResp} returns this + */ +proto.cc.arduino.cli.commands.UpdateLibrariesIndexResp.prototype.clearDownloadProgress = function() { + return this.setDownloadProgress(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.UpdateLibrariesIndexResp.prototype.hasDownloadProgress = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.VersionReq.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.VersionReq.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.VersionReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.VersionReq.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.cc.arduino.cli.commands.VersionReq} + */ +proto.cc.arduino.cli.commands.VersionReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.VersionReq; + return proto.cc.arduino.cli.commands.VersionReq.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.VersionReq} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.VersionReq} + */ +proto.cc.arduino.cli.commands.VersionReq.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.cc.arduino.cli.commands.VersionReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.VersionReq.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cc.arduino.cli.commands.VersionReq} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.VersionReq.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.VersionResp.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.VersionResp.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.VersionResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.VersionResp.toObject = function(includeInstance, msg) { + var f, obj = { + version: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cc.arduino.cli.commands.VersionResp} + */ +proto.cc.arduino.cli.commands.VersionResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.VersionResp; + return proto.cc.arduino.cli.commands.VersionResp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.VersionResp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.VersionResp} + */ +proto.cc.arduino.cli.commands.VersionResp.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.setVersion(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.commands.VersionResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.VersionResp.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cc.arduino.cli.commands.VersionResp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.VersionResp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getVersion(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string version = 1; + * @return {string} + */ +proto.cc.arduino.cli.commands.VersionResp.prototype.getVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.VersionResp} returns this + */ +proto.cc.arduino.cli.commands.VersionResp.prototype.setVersion = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +goog.object.extend(exports, proto.cc.arduino.cli.commands); diff --git a/arduino-ide-extension/src/node/cli-protocol/commands/common_grpc_pb.js b/arduino-ide-extension/src/node/cli-protocol/commands/common_grpc_pb.js new file mode 100644 index 00000000..97b3a246 --- /dev/null +++ b/arduino-ide-extension/src/node/cli-protocol/commands/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/commands/common_pb.d.ts b/arduino-ide-extension/src/node/cli-protocol/commands/common_pb.d.ts new file mode 100644 index 00000000..b26d75a3 --- /dev/null +++ b/arduino-ide-extension/src/node/cli-protocol/commands/common_pb.d.ts @@ -0,0 +1,94 @@ +// package: cc.arduino.cli.commands +// file: commands/common.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; + +export class Instance extends jspb.Message { + getId(): number; + setId(value: number): Instance; + + + 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): DownloadProgress; + + getFile(): string; + setFile(value: string): DownloadProgress; + + getTotalSize(): number; + setTotalSize(value: number): DownloadProgress; + + getDownloaded(): number; + setDownloaded(value: number): DownloadProgress; + + getCompleted(): boolean; + setCompleted(value: boolean): DownloadProgress; + + + 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): TaskProgress; + + getMessage(): string; + setMessage(value: string): TaskProgress; + + getCompleted(): boolean; + setCompleted(value: boolean): TaskProgress; + + + 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/commands/common_pb.js b/arduino-ide-extension/src/node/cli-protocol/commands/common_pb.js new file mode 100644 index 00000000..21142a98 --- /dev/null +++ b/arduino-ide-extension/src/node/cli-protocol/commands/common_pb.js @@ -0,0 +1,651 @@ +// source: commands/common.proto +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +goog.exportSymbol('proto.cc.arduino.cli.commands.DownloadProgress', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.Instance', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.TaskProgress', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.Instance = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.Instance, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.Instance.displayName = 'proto.cc.arduino.cli.commands.Instance'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.DownloadProgress = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.DownloadProgress, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.DownloadProgress.displayName = 'proto.cc.arduino.cli.commands.DownloadProgress'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.TaskProgress = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.TaskProgress, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.TaskProgress.displayName = 'proto.cc.arduino.cli.commands.TaskProgress'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.Instance.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.Instance.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.Instance} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.Instance.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cc.arduino.cli.commands.Instance} + */ +proto.cc.arduino.cli.commands.Instance.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.Instance; + return proto.cc.arduino.cli.commands.Instance.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.Instance} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.Instance} + */ +proto.cc.arduino.cli.commands.Instance.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.commands.Instance.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.Instance.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cc.arduino.cli.commands.Instance} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.Instance.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f !== 0) { + writer.writeInt32( + 1, + f + ); + } +}; + + +/** + * optional int32 id = 1; + * @return {number} + */ +proto.cc.arduino.cli.commands.Instance.prototype.getId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cc.arduino.cli.commands.Instance} returns this + */ +proto.cc.arduino.cli.commands.Instance.prototype.setId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.DownloadProgress.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.DownloadProgress.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.DownloadProgress} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.DownloadProgress.toObject = function(includeInstance, msg) { + var f, obj = { + url: jspb.Message.getFieldWithDefault(msg, 1, ""), + file: jspb.Message.getFieldWithDefault(msg, 2, ""), + totalSize: jspb.Message.getFieldWithDefault(msg, 3, 0), + downloaded: jspb.Message.getFieldWithDefault(msg, 4, 0), + completed: jspb.Message.getBooleanFieldWithDefault(msg, 5, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cc.arduino.cli.commands.DownloadProgress} + */ +proto.cc.arduino.cli.commands.DownloadProgress.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.DownloadProgress; + return proto.cc.arduino.cli.commands.DownloadProgress.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.DownloadProgress} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.DownloadProgress} + */ +proto.cc.arduino.cli.commands.DownloadProgress.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setUrl(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setFile(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalSize(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setDownloaded(value); + break; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setCompleted(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.commands.DownloadProgress.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.DownloadProgress.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cc.arduino.cli.commands.DownloadProgress} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.DownloadProgress.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUrl(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getFile(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getTotalSize(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getDownloaded(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getCompleted(); + if (f) { + writer.writeBool( + 5, + f + ); + } +}; + + +/** + * optional string url = 1; + * @return {string} + */ +proto.cc.arduino.cli.commands.DownloadProgress.prototype.getUrl = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.DownloadProgress} returns this + */ +proto.cc.arduino.cli.commands.DownloadProgress.prototype.setUrl = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string file = 2; + * @return {string} + */ +proto.cc.arduino.cli.commands.DownloadProgress.prototype.getFile = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.DownloadProgress} returns this + */ +proto.cc.arduino.cli.commands.DownloadProgress.prototype.setFile = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional int64 total_size = 3; + * @return {number} + */ +proto.cc.arduino.cli.commands.DownloadProgress.prototype.getTotalSize = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cc.arduino.cli.commands.DownloadProgress} returns this + */ +proto.cc.arduino.cli.commands.DownloadProgress.prototype.setTotalSize = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional int64 downloaded = 4; + * @return {number} + */ +proto.cc.arduino.cli.commands.DownloadProgress.prototype.getDownloaded = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cc.arduino.cli.commands.DownloadProgress} returns this + */ +proto.cc.arduino.cli.commands.DownloadProgress.prototype.setDownloaded = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional bool completed = 5; + * @return {boolean} + */ +proto.cc.arduino.cli.commands.DownloadProgress.prototype.getCompleted = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cc.arduino.cli.commands.DownloadProgress} returns this + */ +proto.cc.arduino.cli.commands.DownloadProgress.prototype.setCompleted = function(value) { + return jspb.Message.setProto3BooleanField(this, 5, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.TaskProgress.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.TaskProgress.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.TaskProgress} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.TaskProgress.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + message: jspb.Message.getFieldWithDefault(msg, 2, ""), + completed: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cc.arduino.cli.commands.TaskProgress} + */ +proto.cc.arduino.cli.commands.TaskProgress.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.TaskProgress; + return proto.cc.arduino.cli.commands.TaskProgress.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.TaskProgress} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.TaskProgress} + */ +proto.cc.arduino.cli.commands.TaskProgress.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setMessage(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setCompleted(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.commands.TaskProgress.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.TaskProgress.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cc.arduino.cli.commands.TaskProgress} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.TaskProgress.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getMessage(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getCompleted(); + if (f) { + writer.writeBool( + 3, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.cc.arduino.cli.commands.TaskProgress.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.TaskProgress} returns this + */ +proto.cc.arduino.cli.commands.TaskProgress.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string message = 2; + * @return {string} + */ +proto.cc.arduino.cli.commands.TaskProgress.prototype.getMessage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.TaskProgress} returns this + */ +proto.cc.arduino.cli.commands.TaskProgress.prototype.setMessage = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional bool completed = 3; + * @return {boolean} + */ +proto.cc.arduino.cli.commands.TaskProgress.prototype.getCompleted = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cc.arduino.cli.commands.TaskProgress} returns this + */ +proto.cc.arduino.cli.commands.TaskProgress.prototype.setCompleted = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); +}; + + +goog.object.extend(exports, proto.cc.arduino.cli.commands); diff --git a/arduino-ide-extension/src/node/cli-protocol/commands/compile_grpc_pb.js b/arduino-ide-extension/src/node/cli-protocol/commands/compile_grpc_pb.js new file mode 100644 index 00000000..97b3a246 --- /dev/null +++ b/arduino-ide-extension/src/node/cli-protocol/commands/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/commands/compile_pb.d.ts b/arduino-ide-extension/src/node/cli-protocol/commands/compile_pb.d.ts new file mode 100644 index 00000000..6711cf32 --- /dev/null +++ b/arduino-ide-extension/src/node/cli-protocol/commands/compile_pb.d.ts @@ -0,0 +1,137 @@ +// package: cc.arduino.cli.commands +// file: commands/compile.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; +import * as commands_common_pb from "../commands/common_pb"; + +export class CompileReq extends jspb.Message { + + hasInstance(): boolean; + clearInstance(): void; + getInstance(): commands_common_pb.Instance | undefined; + setInstance(value?: commands_common_pb.Instance): CompileReq; + + getFqbn(): string; + setFqbn(value: string): CompileReq; + + getSketchpath(): string; + setSketchpath(value: string): CompileReq; + + getShowproperties(): boolean; + setShowproperties(value: boolean): CompileReq; + + getPreprocess(): boolean; + setPreprocess(value: boolean): CompileReq; + + getBuildcachepath(): string; + setBuildcachepath(value: string): CompileReq; + + getBuildpath(): string; + setBuildpath(value: string): CompileReq; + + clearBuildpropertiesList(): void; + getBuildpropertiesList(): Array; + setBuildpropertiesList(value: Array): CompileReq; + addBuildproperties(value: string, index?: number): string; + + getWarnings(): string; + setWarnings(value: string): CompileReq; + + getVerbose(): boolean; + setVerbose(value: boolean): CompileReq; + + getQuiet(): boolean; + setQuiet(value: boolean): CompileReq; + + getVidpid(): string; + setVidpid(value: string): CompileReq; + + getExportfile(): string; + setExportfile(value: string): CompileReq; + + getJobs(): number; + setJobs(value: number): CompileReq; + + clearLibrariesList(): void; + getLibrariesList(): Array; + setLibrariesList(value: Array): CompileReq; + addLibraries(value: string, index?: number): string; + + getOptimizefordebug(): boolean; + setOptimizefordebug(value: boolean): CompileReq; + + getDryrun(): boolean; + setDryrun(value: boolean): CompileReq; + + getExportDir(): string; + setExportDir(value: string): CompileReq; + + getProgrammer(): string; + setProgrammer(value: string): CompileReq; + + + 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?: commands_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, + jobs: number, + librariesList: Array, + optimizefordebug: boolean, + dryrun: boolean, + exportDir: string, + programmer: string, + } +} + +export class CompileResp extends jspb.Message { + getOutStream(): Uint8Array | string; + getOutStream_asU8(): Uint8Array; + getOutStream_asB64(): string; + setOutStream(value: Uint8Array | string): CompileResp; + + getErrStream(): Uint8Array | string; + getErrStream_asU8(): Uint8Array; + getErrStream_asB64(): string; + setErrStream(value: Uint8Array | string): CompileResp; + + + 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, + } +} diff --git a/arduino-ide-extension/src/node/cli-protocol/commands/compile_pb.js b/arduino-ide-extension/src/node/cli-protocol/commands/compile_pb.js new file mode 100644 index 00000000..15bdb617 --- /dev/null +++ b/arduino-ide-extension/src/node/cli-protocol/commands/compile_pb.js @@ -0,0 +1,1005 @@ +// source: commands/compile.proto +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var commands_common_pb = require('../commands/common_pb.js'); +goog.object.extend(proto, commands_common_pb); +goog.exportSymbol('proto.cc.arduino.cli.commands.CompileReq', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.CompileReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cc.arduino.cli.commands.CompileReq.repeatedFields_, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.CompileReq, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.CompileReq.displayName = 'proto.cc.arduino.cli.commands.CompileReq'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.CompileResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.CompileResp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.CompileResp.displayName = 'proto.cc.arduino.cli.commands.CompileResp'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cc.arduino.cli.commands.CompileReq.repeatedFields_ = [8,15]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.CompileReq.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.CompileReq.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.CompileReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.CompileReq.toObject = function(includeInstance, msg) { + var f, obj = { + instance: (f = msg.getInstance()) && commands_common_pb.Instance.toObject(includeInstance, f), + fqbn: jspb.Message.getFieldWithDefault(msg, 2, ""), + sketchpath: jspb.Message.getFieldWithDefault(msg, 3, ""), + showproperties: jspb.Message.getBooleanFieldWithDefault(msg, 4, false), + preprocess: jspb.Message.getBooleanFieldWithDefault(msg, 5, false), + buildcachepath: jspb.Message.getFieldWithDefault(msg, 6, ""), + buildpath: jspb.Message.getFieldWithDefault(msg, 7, ""), + buildpropertiesList: (f = jspb.Message.getRepeatedField(msg, 8)) == null ? undefined : f, + warnings: jspb.Message.getFieldWithDefault(msg, 9, ""), + verbose: jspb.Message.getBooleanFieldWithDefault(msg, 10, false), + quiet: jspb.Message.getBooleanFieldWithDefault(msg, 11, false), + vidpid: jspb.Message.getFieldWithDefault(msg, 12, ""), + exportfile: jspb.Message.getFieldWithDefault(msg, 13, ""), + jobs: jspb.Message.getFieldWithDefault(msg, 14, 0), + librariesList: (f = jspb.Message.getRepeatedField(msg, 15)) == null ? undefined : f, + optimizefordebug: jspb.Message.getBooleanFieldWithDefault(msg, 16, false), + dryrun: jspb.Message.getBooleanFieldWithDefault(msg, 17, false), + exportDir: jspb.Message.getFieldWithDefault(msg, 18, ""), + programmer: jspb.Message.getFieldWithDefault(msg, 19, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cc.arduino.cli.commands.CompileReq} + */ +proto.cc.arduino.cli.commands.CompileReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.CompileReq; + return proto.cc.arduino.cli.commands.CompileReq.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.CompileReq} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.CompileReq} + */ +proto.cc.arduino.cli.commands.CompileReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new commands_common_pb.Instance; + reader.readMessage(value,commands_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; + case 14: + var value = /** @type {number} */ (reader.readInt32()); + msg.setJobs(value); + break; + case 15: + var value = /** @type {string} */ (reader.readString()); + msg.addLibraries(value); + break; + case 16: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setOptimizefordebug(value); + break; + case 17: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setDryrun(value); + break; + case 18: + var value = /** @type {string} */ (reader.readString()); + msg.setExportDir(value); + break; + case 19: + var value = /** @type {string} */ (reader.readString()); + msg.setProgrammer(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.commands.CompileReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.CompileReq} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.CompileReq.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInstance(); + if (f != null) { + writer.writeMessage( + 1, + f, + commands_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 + ); + } + f = message.getJobs(); + if (f !== 0) { + writer.writeInt32( + 14, + f + ); + } + f = message.getLibrariesList(); + if (f.length > 0) { + writer.writeRepeatedString( + 15, + f + ); + } + f = message.getOptimizefordebug(); + if (f) { + writer.writeBool( + 16, + f + ); + } + f = message.getDryrun(); + if (f) { + writer.writeBool( + 17, + f + ); + } + f = message.getExportDir(); + if (f.length > 0) { + writer.writeString( + 18, + f + ); + } + f = message.getProgrammer(); + if (f.length > 0) { + writer.writeString( + 19, + f + ); + } +}; + + +/** + * optional Instance instance = 1; + * @return {?proto.cc.arduino.cli.commands.Instance} + */ +proto.cc.arduino.cli.commands.CompileReq.prototype.getInstance = function() { + return /** @type{?proto.cc.arduino.cli.commands.Instance} */ ( + jspb.Message.getWrapperField(this, commands_common_pb.Instance, 1)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.Instance|undefined} value + * @return {!proto.cc.arduino.cli.commands.CompileReq} returns this +*/ +proto.cc.arduino.cli.commands.CompileReq.prototype.setInstance = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.CompileReq} returns this + */ +proto.cc.arduino.cli.commands.CompileReq.prototype.clearInstance = function() { + return this.setInstance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.CompileReq.prototype.hasInstance = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string fqbn = 2; + * @return {string} + */ +proto.cc.arduino.cli.commands.CompileReq.prototype.getFqbn = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.CompileReq} returns this + */ +proto.cc.arduino.cli.commands.CompileReq.prototype.setFqbn = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string sketchPath = 3; + * @return {string} + */ +proto.cc.arduino.cli.commands.CompileReq.prototype.getSketchpath = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.CompileReq} returns this + */ +proto.cc.arduino.cli.commands.CompileReq.prototype.setSketchpath = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional bool showProperties = 4; + * @return {boolean} + */ +proto.cc.arduino.cli.commands.CompileReq.prototype.getShowproperties = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cc.arduino.cli.commands.CompileReq} returns this + */ +proto.cc.arduino.cli.commands.CompileReq.prototype.setShowproperties = function(value) { + return jspb.Message.setProto3BooleanField(this, 4, value); +}; + + +/** + * optional bool preprocess = 5; + * @return {boolean} + */ +proto.cc.arduino.cli.commands.CompileReq.prototype.getPreprocess = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cc.arduino.cli.commands.CompileReq} returns this + */ +proto.cc.arduino.cli.commands.CompileReq.prototype.setPreprocess = function(value) { + return jspb.Message.setProto3BooleanField(this, 5, value); +}; + + +/** + * optional string buildCachePath = 6; + * @return {string} + */ +proto.cc.arduino.cli.commands.CompileReq.prototype.getBuildcachepath = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.CompileReq} returns this + */ +proto.cc.arduino.cli.commands.CompileReq.prototype.setBuildcachepath = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional string buildPath = 7; + * @return {string} + */ +proto.cc.arduino.cli.commands.CompileReq.prototype.getBuildpath = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.CompileReq} returns this + */ +proto.cc.arduino.cli.commands.CompileReq.prototype.setBuildpath = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + +/** + * repeated string buildProperties = 8; + * @return {!Array} + */ +proto.cc.arduino.cli.commands.CompileReq.prototype.getBuildpropertiesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 8)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cc.arduino.cli.commands.CompileReq} returns this + */ +proto.cc.arduino.cli.commands.CompileReq.prototype.setBuildpropertiesList = function(value) { + return jspb.Message.setField(this, 8, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.cc.arduino.cli.commands.CompileReq} returns this + */ +proto.cc.arduino.cli.commands.CompileReq.prototype.addBuildproperties = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 8, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cc.arduino.cli.commands.CompileReq} returns this + */ +proto.cc.arduino.cli.commands.CompileReq.prototype.clearBuildpropertiesList = function() { + return this.setBuildpropertiesList([]); +}; + + +/** + * optional string warnings = 9; + * @return {string} + */ +proto.cc.arduino.cli.commands.CompileReq.prototype.getWarnings = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.CompileReq} returns this + */ +proto.cc.arduino.cli.commands.CompileReq.prototype.setWarnings = function(value) { + return jspb.Message.setProto3StringField(this, 9, value); +}; + + +/** + * optional bool verbose = 10; + * @return {boolean} + */ +proto.cc.arduino.cli.commands.CompileReq.prototype.getVerbose = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 10, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cc.arduino.cli.commands.CompileReq} returns this + */ +proto.cc.arduino.cli.commands.CompileReq.prototype.setVerbose = function(value) { + return jspb.Message.setProto3BooleanField(this, 10, value); +}; + + +/** + * optional bool quiet = 11; + * @return {boolean} + */ +proto.cc.arduino.cli.commands.CompileReq.prototype.getQuiet = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 11, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cc.arduino.cli.commands.CompileReq} returns this + */ +proto.cc.arduino.cli.commands.CompileReq.prototype.setQuiet = function(value) { + return jspb.Message.setProto3BooleanField(this, 11, value); +}; + + +/** + * optional string vidPid = 12; + * @return {string} + */ +proto.cc.arduino.cli.commands.CompileReq.prototype.getVidpid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.CompileReq} returns this + */ +proto.cc.arduino.cli.commands.CompileReq.prototype.setVidpid = function(value) { + return jspb.Message.setProto3StringField(this, 12, value); +}; + + +/** + * optional string exportFile = 13; + * @return {string} + */ +proto.cc.arduino.cli.commands.CompileReq.prototype.getExportfile = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 13, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.CompileReq} returns this + */ +proto.cc.arduino.cli.commands.CompileReq.prototype.setExportfile = function(value) { + return jspb.Message.setProto3StringField(this, 13, value); +}; + + +/** + * optional int32 jobs = 14; + * @return {number} + */ +proto.cc.arduino.cli.commands.CompileReq.prototype.getJobs = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 14, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cc.arduino.cli.commands.CompileReq} returns this + */ +proto.cc.arduino.cli.commands.CompileReq.prototype.setJobs = function(value) { + return jspb.Message.setProto3IntField(this, 14, value); +}; + + +/** + * repeated string libraries = 15; + * @return {!Array} + */ +proto.cc.arduino.cli.commands.CompileReq.prototype.getLibrariesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 15)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cc.arduino.cli.commands.CompileReq} returns this + */ +proto.cc.arduino.cli.commands.CompileReq.prototype.setLibrariesList = function(value) { + return jspb.Message.setField(this, 15, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.cc.arduino.cli.commands.CompileReq} returns this + */ +proto.cc.arduino.cli.commands.CompileReq.prototype.addLibraries = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 15, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cc.arduino.cli.commands.CompileReq} returns this + */ +proto.cc.arduino.cli.commands.CompileReq.prototype.clearLibrariesList = function() { + return this.setLibrariesList([]); +}; + + +/** + * optional bool optimizeForDebug = 16; + * @return {boolean} + */ +proto.cc.arduino.cli.commands.CompileReq.prototype.getOptimizefordebug = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 16, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cc.arduino.cli.commands.CompileReq} returns this + */ +proto.cc.arduino.cli.commands.CompileReq.prototype.setOptimizefordebug = function(value) { + return jspb.Message.setProto3BooleanField(this, 16, value); +}; + + +/** + * optional bool dryRun = 17; + * @return {boolean} + */ +proto.cc.arduino.cli.commands.CompileReq.prototype.getDryrun = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 17, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cc.arduino.cli.commands.CompileReq} returns this + */ +proto.cc.arduino.cli.commands.CompileReq.prototype.setDryrun = function(value) { + return jspb.Message.setProto3BooleanField(this, 17, value); +}; + + +/** + * optional string export_dir = 18; + * @return {string} + */ +proto.cc.arduino.cli.commands.CompileReq.prototype.getExportDir = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 18, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.CompileReq} returns this + */ +proto.cc.arduino.cli.commands.CompileReq.prototype.setExportDir = function(value) { + return jspb.Message.setProto3StringField(this, 18, value); +}; + + +/** + * optional string programmer = 19; + * @return {string} + */ +proto.cc.arduino.cli.commands.CompileReq.prototype.getProgrammer = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 19, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.CompileReq} returns this + */ +proto.cc.arduino.cli.commands.CompileReq.prototype.setProgrammer = function(value) { + return jspb.Message.setProto3StringField(this, 19, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.CompileResp.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.CompileResp.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.CompileResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.CompileResp.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.cc.arduino.cli.commands.CompileResp} + */ +proto.cc.arduino.cli.commands.CompileResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.CompileResp; + return proto.cc.arduino.cli.commands.CompileResp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.CompileResp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.CompileResp} + */ +proto.cc.arduino.cli.commands.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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.commands.CompileResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.CompileResp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.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 + ); + } +}; + + +/** + * optional bytes out_stream = 1; + * @return {!(string|Uint8Array)} + */ +proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.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.cc.arduino.cli.commands.CompileResp.prototype.getOutStream_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getOutStream())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cc.arduino.cli.commands.CompileResp} returns this + */ +proto.cc.arduino.cli.commands.CompileResp.prototype.setOutStream = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes err_stream = 2; + * @return {!(string|Uint8Array)} + */ +proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.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.cc.arduino.cli.commands.CompileResp.prototype.getErrStream_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getErrStream())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cc.arduino.cli.commands.CompileResp} returns this + */ +proto.cc.arduino.cli.commands.CompileResp.prototype.setErrStream = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +goog.object.extend(exports, proto.cc.arduino.cli.commands); diff --git a/arduino-ide-extension/src/node/cli-protocol/commands/core_grpc_pb.js b/arduino-ide-extension/src/node/cli-protocol/commands/core_grpc_pb.js new file mode 100644 index 00000000..97b3a246 --- /dev/null +++ b/arduino-ide-extension/src/node/cli-protocol/commands/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/commands/core_pb.d.ts b/arduino-ide-extension/src/node/cli-protocol/commands/core_pb.d.ts new file mode 100644 index 00000000..9dc6a9b4 --- /dev/null +++ b/arduino-ide-extension/src/node/cli-protocol/commands/core_pb.d.ts @@ -0,0 +1,436 @@ +// package: cc.arduino.cli.commands +// file: commands/core.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; +import * as commands_common_pb from "../commands/common_pb"; + +export class PlatformInstallReq extends jspb.Message { + + hasInstance(): boolean; + clearInstance(): void; + getInstance(): commands_common_pb.Instance | undefined; + setInstance(value?: commands_common_pb.Instance): PlatformInstallReq; + + getPlatformPackage(): string; + setPlatformPackage(value: string): PlatformInstallReq; + + getArchitecture(): string; + setArchitecture(value: string): PlatformInstallReq; + + getVersion(): string; + setVersion(value: string): PlatformInstallReq; + + + 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?: commands_common_pb.Instance.AsObject, + platformPackage: string, + architecture: string, + version: string, + } +} + +export class PlatformInstallResp extends jspb.Message { + + hasProgress(): boolean; + clearProgress(): void; + getProgress(): commands_common_pb.DownloadProgress | undefined; + setProgress(value?: commands_common_pb.DownloadProgress): PlatformInstallResp; + + + hasTaskProgress(): boolean; + clearTaskProgress(): void; + getTaskProgress(): commands_common_pb.TaskProgress | undefined; + setTaskProgress(value?: commands_common_pb.TaskProgress): PlatformInstallResp; + + + 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?: commands_common_pb.DownloadProgress.AsObject, + taskProgress?: commands_common_pb.TaskProgress.AsObject, + } +} + +export class PlatformDownloadReq extends jspb.Message { + + hasInstance(): boolean; + clearInstance(): void; + getInstance(): commands_common_pb.Instance | undefined; + setInstance(value?: commands_common_pb.Instance): PlatformDownloadReq; + + getPlatformPackage(): string; + setPlatformPackage(value: string): PlatformDownloadReq; + + getArchitecture(): string; + setArchitecture(value: string): PlatformDownloadReq; + + getVersion(): string; + setVersion(value: string): PlatformDownloadReq; + + + 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?: commands_common_pb.Instance.AsObject, + platformPackage: string, + architecture: string, + version: string, + } +} + +export class PlatformDownloadResp extends jspb.Message { + + hasProgress(): boolean; + clearProgress(): void; + getProgress(): commands_common_pb.DownloadProgress | undefined; + setProgress(value?: commands_common_pb.DownloadProgress): PlatformDownloadResp; + + + 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?: commands_common_pb.DownloadProgress.AsObject, + } +} + +export class PlatformUninstallReq extends jspb.Message { + + hasInstance(): boolean; + clearInstance(): void; + getInstance(): commands_common_pb.Instance | undefined; + setInstance(value?: commands_common_pb.Instance): PlatformUninstallReq; + + getPlatformPackage(): string; + setPlatformPackage(value: string): PlatformUninstallReq; + + getArchitecture(): string; + setArchitecture(value: string): PlatformUninstallReq; + + + 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?: commands_common_pb.Instance.AsObject, + platformPackage: string, + architecture: string, + } +} + +export class PlatformUninstallResp extends jspb.Message { + + hasTaskProgress(): boolean; + clearTaskProgress(): void; + getTaskProgress(): commands_common_pb.TaskProgress | undefined; + setTaskProgress(value?: commands_common_pb.TaskProgress): PlatformUninstallResp; + + + 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?: commands_common_pb.TaskProgress.AsObject, + } +} + +export class PlatformUpgradeReq extends jspb.Message { + + hasInstance(): boolean; + clearInstance(): void; + getInstance(): commands_common_pb.Instance | undefined; + setInstance(value?: commands_common_pb.Instance): PlatformUpgradeReq; + + getPlatformPackage(): string; + setPlatformPackage(value: string): PlatformUpgradeReq; + + getArchitecture(): string; + setArchitecture(value: string): PlatformUpgradeReq; + + + 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?: commands_common_pb.Instance.AsObject, + platformPackage: string, + architecture: string, + } +} + +export class PlatformUpgradeResp extends jspb.Message { + + hasProgress(): boolean; + clearProgress(): void; + getProgress(): commands_common_pb.DownloadProgress | undefined; + setProgress(value?: commands_common_pb.DownloadProgress): PlatformUpgradeResp; + + + hasTaskProgress(): boolean; + clearTaskProgress(): void; + getTaskProgress(): commands_common_pb.TaskProgress | undefined; + setTaskProgress(value?: commands_common_pb.TaskProgress): PlatformUpgradeResp; + + + 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?: commands_common_pb.DownloadProgress.AsObject, + taskProgress?: commands_common_pb.TaskProgress.AsObject, + } +} + +export class PlatformSearchReq extends jspb.Message { + + hasInstance(): boolean; + clearInstance(): void; + getInstance(): commands_common_pb.Instance | undefined; + setInstance(value?: commands_common_pb.Instance): PlatformSearchReq; + + getSearchArgs(): string; + setSearchArgs(value: string): PlatformSearchReq; + + getAllVersions(): boolean; + setAllVersions(value: boolean): PlatformSearchReq; + + + 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?: commands_common_pb.Instance.AsObject, + searchArgs: string, + allVersions: boolean, + } +} + +export class PlatformSearchResp extends jspb.Message { + clearSearchOutputList(): void; + getSearchOutputList(): Array; + setSearchOutputList(value: Array): PlatformSearchResp; + addSearchOutput(value?: Platform, index?: number): Platform; + + + 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 PlatformListReq extends jspb.Message { + + hasInstance(): boolean; + clearInstance(): void; + getInstance(): commands_common_pb.Instance | undefined; + setInstance(value?: commands_common_pb.Instance): PlatformListReq; + + getUpdatableOnly(): boolean; + setUpdatableOnly(value: boolean): PlatformListReq; + + + 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?: commands_common_pb.Instance.AsObject, + updatableOnly: boolean, + } +} + +export class PlatformListResp extends jspb.Message { + clearInstalledPlatformList(): void; + getInstalledPlatformList(): Array; + setInstalledPlatformList(value: Array): PlatformListResp; + addInstalledPlatform(value?: Platform, index?: number): Platform; + + + 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 Platform extends jspb.Message { + getId(): string; + setId(value: string): Platform; + + getInstalled(): string; + setInstalled(value: string): Platform; + + getLatest(): string; + setLatest(value: string): Platform; + + getName(): string; + setName(value: string): Platform; + + getMaintainer(): string; + setMaintainer(value: string): Platform; + + getWebsite(): string; + setWebsite(value: string): Platform; + + getEmail(): string; + setEmail(value: string): Platform; + + clearBoardsList(): void; + getBoardsList(): Array; + setBoardsList(value: Array): Platform; + addBoards(value?: Board, index?: number): Board; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Platform.AsObject; + static toObject(includeInstance: boolean, msg: Platform): Platform.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Platform, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Platform; + static deserializeBinaryFromReader(message: Platform, reader: jspb.BinaryReader): Platform; +} + +export namespace Platform { + export type AsObject = { + id: string, + installed: string, + latest: string, + name: string, + maintainer: string, + website: string, + email: string, + boardsList: Array, + } +} + +export class Board extends jspb.Message { + getName(): string; + setName(value: string): Board; + + getFqbn(): string; + setFqbn(value: string): Board; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Board.AsObject; + static toObject(includeInstance: boolean, msg: Board): Board.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Board, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Board; + static deserializeBinaryFromReader(message: Board, reader: jspb.BinaryReader): Board; +} + +export namespace Board { + export type AsObject = { + name: string, + fqbn: string, + } +} diff --git a/arduino-ide-extension/src/node/cli-protocol/commands/core_pb.js b/arduino-ide-extension/src/node/cli-protocol/commands/core_pb.js new file mode 100644 index 00000000..88f25873 --- /dev/null +++ b/arduino-ide-extension/src/node/cli-protocol/commands/core_pb.js @@ -0,0 +1,3177 @@ +// source: commands/core.proto +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var commands_common_pb = require('../commands/common_pb.js'); +goog.object.extend(proto, commands_common_pb); +goog.exportSymbol('proto.cc.arduino.cli.commands.Board', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.Platform', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.PlatformDownloadReq', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.PlatformDownloadResp', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.PlatformInstallReq', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.PlatformInstallResp', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.PlatformListReq', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.PlatformListResp', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.PlatformSearchReq', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.PlatformSearchResp', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.PlatformUninstallReq', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.PlatformUninstallResp', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.PlatformUpgradeReq', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.PlatformUpgradeResp', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.PlatformInstallReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.PlatformInstallReq, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.PlatformInstallReq.displayName = 'proto.cc.arduino.cli.commands.PlatformInstallReq'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.PlatformInstallResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.PlatformInstallResp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.PlatformInstallResp.displayName = 'proto.cc.arduino.cli.commands.PlatformInstallResp'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.PlatformDownloadReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.PlatformDownloadReq, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.PlatformDownloadReq.displayName = 'proto.cc.arduino.cli.commands.PlatformDownloadReq'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.PlatformDownloadResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.PlatformDownloadResp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.PlatformDownloadResp.displayName = 'proto.cc.arduino.cli.commands.PlatformDownloadResp'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.PlatformUninstallReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.PlatformUninstallReq, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.PlatformUninstallReq.displayName = 'proto.cc.arduino.cli.commands.PlatformUninstallReq'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.PlatformUninstallResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.PlatformUninstallResp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.PlatformUninstallResp.displayName = 'proto.cc.arduino.cli.commands.PlatformUninstallResp'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.PlatformUpgradeReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.PlatformUpgradeReq, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.PlatformUpgradeReq.displayName = 'proto.cc.arduino.cli.commands.PlatformUpgradeReq'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.PlatformUpgradeResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.PlatformUpgradeResp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.PlatformUpgradeResp.displayName = 'proto.cc.arduino.cli.commands.PlatformUpgradeResp'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.PlatformSearchReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.PlatformSearchReq, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.PlatformSearchReq.displayName = 'proto.cc.arduino.cli.commands.PlatformSearchReq'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.PlatformSearchResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cc.arduino.cli.commands.PlatformSearchResp.repeatedFields_, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.PlatformSearchResp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.PlatformSearchResp.displayName = 'proto.cc.arduino.cli.commands.PlatformSearchResp'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.PlatformListReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.PlatformListReq, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.PlatformListReq.displayName = 'proto.cc.arduino.cli.commands.PlatformListReq'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.PlatformListResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cc.arduino.cli.commands.PlatformListResp.repeatedFields_, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.PlatformListResp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.PlatformListResp.displayName = 'proto.cc.arduino.cli.commands.PlatformListResp'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.Platform = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cc.arduino.cli.commands.Platform.repeatedFields_, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.Platform, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.Platform.displayName = 'proto.cc.arduino.cli.commands.Platform'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.Board = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.Board, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.Board.displayName = 'proto.cc.arduino.cli.commands.Board'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.PlatformInstallReq.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.PlatformInstallReq.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.PlatformInstallReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.PlatformInstallReq.toObject = function(includeInstance, msg) { + var f, obj = { + instance: (f = msg.getInstance()) && commands_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.cc.arduino.cli.commands.PlatformInstallReq} + */ +proto.cc.arduino.cli.commands.PlatformInstallReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.PlatformInstallReq; + return proto.cc.arduino.cli.commands.PlatformInstallReq.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.PlatformInstallReq} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.PlatformInstallReq} + */ +proto.cc.arduino.cli.commands.PlatformInstallReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new commands_common_pb.Instance; + reader.readMessage(value,commands_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.cc.arduino.cli.commands.PlatformInstallReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.PlatformInstallReq} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.PlatformInstallReq.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInstance(); + if (f != null) { + writer.writeMessage( + 1, + f, + commands_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.cc.arduino.cli.commands.Instance} + */ +proto.cc.arduino.cli.commands.PlatformInstallReq.prototype.getInstance = function() { + return /** @type{?proto.cc.arduino.cli.commands.Instance} */ ( + jspb.Message.getWrapperField(this, commands_common_pb.Instance, 1)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.Instance|undefined} value + * @return {!proto.cc.arduino.cli.commands.PlatformInstallReq} returns this +*/ +proto.cc.arduino.cli.commands.PlatformInstallReq.prototype.setInstance = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.PlatformInstallReq} returns this + */ +proto.cc.arduino.cli.commands.PlatformInstallReq.prototype.clearInstance = function() { + return this.setInstance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.PlatformInstallReq.prototype.hasInstance = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string platform_package = 2; + * @return {string} + */ +proto.cc.arduino.cli.commands.PlatformInstallReq.prototype.getPlatformPackage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.PlatformInstallReq} returns this + */ +proto.cc.arduino.cli.commands.PlatformInstallReq.prototype.setPlatformPackage = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string architecture = 3; + * @return {string} + */ +proto.cc.arduino.cli.commands.PlatformInstallReq.prototype.getArchitecture = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.PlatformInstallReq} returns this + */ +proto.cc.arduino.cli.commands.PlatformInstallReq.prototype.setArchitecture = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string version = 4; + * @return {string} + */ +proto.cc.arduino.cli.commands.PlatformInstallReq.prototype.getVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.PlatformInstallReq} returns this + */ +proto.cc.arduino.cli.commands.PlatformInstallReq.prototype.setVersion = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.PlatformInstallResp.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.PlatformInstallResp.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.PlatformInstallResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.PlatformInstallResp.toObject = function(includeInstance, msg) { + var f, obj = { + progress: (f = msg.getProgress()) && commands_common_pb.DownloadProgress.toObject(includeInstance, f), + taskProgress: (f = msg.getTaskProgress()) && commands_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.cc.arduino.cli.commands.PlatformInstallResp} + */ +proto.cc.arduino.cli.commands.PlatformInstallResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.PlatformInstallResp; + return proto.cc.arduino.cli.commands.PlatformInstallResp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.PlatformInstallResp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.PlatformInstallResp} + */ +proto.cc.arduino.cli.commands.PlatformInstallResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new commands_common_pb.DownloadProgress; + reader.readMessage(value,commands_common_pb.DownloadProgress.deserializeBinaryFromReader); + msg.setProgress(value); + break; + case 2: + var value = new commands_common_pb.TaskProgress; + reader.readMessage(value,commands_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.cc.arduino.cli.commands.PlatformInstallResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.PlatformInstallResp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.PlatformInstallResp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProgress(); + if (f != null) { + writer.writeMessage( + 1, + f, + commands_common_pb.DownloadProgress.serializeBinaryToWriter + ); + } + f = message.getTaskProgress(); + if (f != null) { + writer.writeMessage( + 2, + f, + commands_common_pb.TaskProgress.serializeBinaryToWriter + ); + } +}; + + +/** + * optional DownloadProgress progress = 1; + * @return {?proto.cc.arduino.cli.commands.DownloadProgress} + */ +proto.cc.arduino.cli.commands.PlatformInstallResp.prototype.getProgress = function() { + return /** @type{?proto.cc.arduino.cli.commands.DownloadProgress} */ ( + jspb.Message.getWrapperField(this, commands_common_pb.DownloadProgress, 1)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.DownloadProgress|undefined} value + * @return {!proto.cc.arduino.cli.commands.PlatformInstallResp} returns this +*/ +proto.cc.arduino.cli.commands.PlatformInstallResp.prototype.setProgress = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.PlatformInstallResp} returns this + */ +proto.cc.arduino.cli.commands.PlatformInstallResp.prototype.clearProgress = function() { + return this.setProgress(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.PlatformInstallResp.prototype.hasProgress = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional TaskProgress task_progress = 2; + * @return {?proto.cc.arduino.cli.commands.TaskProgress} + */ +proto.cc.arduino.cli.commands.PlatformInstallResp.prototype.getTaskProgress = function() { + return /** @type{?proto.cc.arduino.cli.commands.TaskProgress} */ ( + jspb.Message.getWrapperField(this, commands_common_pb.TaskProgress, 2)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.TaskProgress|undefined} value + * @return {!proto.cc.arduino.cli.commands.PlatformInstallResp} returns this +*/ +proto.cc.arduino.cli.commands.PlatformInstallResp.prototype.setTaskProgress = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.PlatformInstallResp} returns this + */ +proto.cc.arduino.cli.commands.PlatformInstallResp.prototype.clearTaskProgress = function() { + return this.setTaskProgress(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.PlatformInstallResp.prototype.hasTaskProgress = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.PlatformDownloadReq.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.PlatformDownloadReq.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.PlatformDownloadReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.PlatformDownloadReq.toObject = function(includeInstance, msg) { + var f, obj = { + instance: (f = msg.getInstance()) && commands_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.cc.arduino.cli.commands.PlatformDownloadReq} + */ +proto.cc.arduino.cli.commands.PlatformDownloadReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.PlatformDownloadReq; + return proto.cc.arduino.cli.commands.PlatformDownloadReq.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.PlatformDownloadReq} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.PlatformDownloadReq} + */ +proto.cc.arduino.cli.commands.PlatformDownloadReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new commands_common_pb.Instance; + reader.readMessage(value,commands_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.cc.arduino.cli.commands.PlatformDownloadReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.PlatformDownloadReq} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.PlatformDownloadReq.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInstance(); + if (f != null) { + writer.writeMessage( + 1, + f, + commands_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.cc.arduino.cli.commands.Instance} + */ +proto.cc.arduino.cli.commands.PlatformDownloadReq.prototype.getInstance = function() { + return /** @type{?proto.cc.arduino.cli.commands.Instance} */ ( + jspb.Message.getWrapperField(this, commands_common_pb.Instance, 1)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.Instance|undefined} value + * @return {!proto.cc.arduino.cli.commands.PlatformDownloadReq} returns this +*/ +proto.cc.arduino.cli.commands.PlatformDownloadReq.prototype.setInstance = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.PlatformDownloadReq} returns this + */ +proto.cc.arduino.cli.commands.PlatformDownloadReq.prototype.clearInstance = function() { + return this.setInstance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.PlatformDownloadReq.prototype.hasInstance = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string platform_package = 2; + * @return {string} + */ +proto.cc.arduino.cli.commands.PlatformDownloadReq.prototype.getPlatformPackage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.PlatformDownloadReq} returns this + */ +proto.cc.arduino.cli.commands.PlatformDownloadReq.prototype.setPlatformPackage = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string architecture = 3; + * @return {string} + */ +proto.cc.arduino.cli.commands.PlatformDownloadReq.prototype.getArchitecture = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.PlatformDownloadReq} returns this + */ +proto.cc.arduino.cli.commands.PlatformDownloadReq.prototype.setArchitecture = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string version = 4; + * @return {string} + */ +proto.cc.arduino.cli.commands.PlatformDownloadReq.prototype.getVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.PlatformDownloadReq} returns this + */ +proto.cc.arduino.cli.commands.PlatformDownloadReq.prototype.setVersion = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.PlatformDownloadResp.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.PlatformDownloadResp.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.PlatformDownloadResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.PlatformDownloadResp.toObject = function(includeInstance, msg) { + var f, obj = { + progress: (f = msg.getProgress()) && commands_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.cc.arduino.cli.commands.PlatformDownloadResp} + */ +proto.cc.arduino.cli.commands.PlatformDownloadResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.PlatformDownloadResp; + return proto.cc.arduino.cli.commands.PlatformDownloadResp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.PlatformDownloadResp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.PlatformDownloadResp} + */ +proto.cc.arduino.cli.commands.PlatformDownloadResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new commands_common_pb.DownloadProgress; + reader.readMessage(value,commands_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.cc.arduino.cli.commands.PlatformDownloadResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.PlatformDownloadResp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.PlatformDownloadResp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProgress(); + if (f != null) { + writer.writeMessage( + 1, + f, + commands_common_pb.DownloadProgress.serializeBinaryToWriter + ); + } +}; + + +/** + * optional DownloadProgress progress = 1; + * @return {?proto.cc.arduino.cli.commands.DownloadProgress} + */ +proto.cc.arduino.cli.commands.PlatformDownloadResp.prototype.getProgress = function() { + return /** @type{?proto.cc.arduino.cli.commands.DownloadProgress} */ ( + jspb.Message.getWrapperField(this, commands_common_pb.DownloadProgress, 1)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.DownloadProgress|undefined} value + * @return {!proto.cc.arduino.cli.commands.PlatformDownloadResp} returns this +*/ +proto.cc.arduino.cli.commands.PlatformDownloadResp.prototype.setProgress = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.PlatformDownloadResp} returns this + */ +proto.cc.arduino.cli.commands.PlatformDownloadResp.prototype.clearProgress = function() { + return this.setProgress(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.PlatformDownloadResp.prototype.hasProgress = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.PlatformUninstallReq.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.PlatformUninstallReq.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.PlatformUninstallReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.PlatformUninstallReq.toObject = function(includeInstance, msg) { + var f, obj = { + instance: (f = msg.getInstance()) && commands_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.cc.arduino.cli.commands.PlatformUninstallReq} + */ +proto.cc.arduino.cli.commands.PlatformUninstallReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.PlatformUninstallReq; + return proto.cc.arduino.cli.commands.PlatformUninstallReq.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.PlatformUninstallReq} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.PlatformUninstallReq} + */ +proto.cc.arduino.cli.commands.PlatformUninstallReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new commands_common_pb.Instance; + reader.readMessage(value,commands_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.cc.arduino.cli.commands.PlatformUninstallReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.PlatformUninstallReq} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.PlatformUninstallReq.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInstance(); + if (f != null) { + writer.writeMessage( + 1, + f, + commands_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.cc.arduino.cli.commands.Instance} + */ +proto.cc.arduino.cli.commands.PlatformUninstallReq.prototype.getInstance = function() { + return /** @type{?proto.cc.arduino.cli.commands.Instance} */ ( + jspb.Message.getWrapperField(this, commands_common_pb.Instance, 1)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.Instance|undefined} value + * @return {!proto.cc.arduino.cli.commands.PlatformUninstallReq} returns this +*/ +proto.cc.arduino.cli.commands.PlatformUninstallReq.prototype.setInstance = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.PlatformUninstallReq} returns this + */ +proto.cc.arduino.cli.commands.PlatformUninstallReq.prototype.clearInstance = function() { + return this.setInstance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.PlatformUninstallReq.prototype.hasInstance = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string platform_package = 2; + * @return {string} + */ +proto.cc.arduino.cli.commands.PlatformUninstallReq.prototype.getPlatformPackage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.PlatformUninstallReq} returns this + */ +proto.cc.arduino.cli.commands.PlatformUninstallReq.prototype.setPlatformPackage = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string architecture = 3; + * @return {string} + */ +proto.cc.arduino.cli.commands.PlatformUninstallReq.prototype.getArchitecture = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.PlatformUninstallReq} returns this + */ +proto.cc.arduino.cli.commands.PlatformUninstallReq.prototype.setArchitecture = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.PlatformUninstallResp.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.PlatformUninstallResp.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.PlatformUninstallResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.PlatformUninstallResp.toObject = function(includeInstance, msg) { + var f, obj = { + taskProgress: (f = msg.getTaskProgress()) && commands_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.cc.arduino.cli.commands.PlatformUninstallResp} + */ +proto.cc.arduino.cli.commands.PlatformUninstallResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.PlatformUninstallResp; + return proto.cc.arduino.cli.commands.PlatformUninstallResp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.PlatformUninstallResp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.PlatformUninstallResp} + */ +proto.cc.arduino.cli.commands.PlatformUninstallResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new commands_common_pb.TaskProgress; + reader.readMessage(value,commands_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.cc.arduino.cli.commands.PlatformUninstallResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.PlatformUninstallResp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.PlatformUninstallResp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTaskProgress(); + if (f != null) { + writer.writeMessage( + 1, + f, + commands_common_pb.TaskProgress.serializeBinaryToWriter + ); + } +}; + + +/** + * optional TaskProgress task_progress = 1; + * @return {?proto.cc.arduino.cli.commands.TaskProgress} + */ +proto.cc.arduino.cli.commands.PlatformUninstallResp.prototype.getTaskProgress = function() { + return /** @type{?proto.cc.arduino.cli.commands.TaskProgress} */ ( + jspb.Message.getWrapperField(this, commands_common_pb.TaskProgress, 1)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.TaskProgress|undefined} value + * @return {!proto.cc.arduino.cli.commands.PlatformUninstallResp} returns this +*/ +proto.cc.arduino.cli.commands.PlatformUninstallResp.prototype.setTaskProgress = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.PlatformUninstallResp} returns this + */ +proto.cc.arduino.cli.commands.PlatformUninstallResp.prototype.clearTaskProgress = function() { + return this.setTaskProgress(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.PlatformUninstallResp.prototype.hasTaskProgress = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.PlatformUpgradeReq.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.PlatformUpgradeReq.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.PlatformUpgradeReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.PlatformUpgradeReq.toObject = function(includeInstance, msg) { + var f, obj = { + instance: (f = msg.getInstance()) && commands_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.cc.arduino.cli.commands.PlatformUpgradeReq} + */ +proto.cc.arduino.cli.commands.PlatformUpgradeReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.PlatformUpgradeReq; + return proto.cc.arduino.cli.commands.PlatformUpgradeReq.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.PlatformUpgradeReq} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.PlatformUpgradeReq} + */ +proto.cc.arduino.cli.commands.PlatformUpgradeReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new commands_common_pb.Instance; + reader.readMessage(value,commands_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.cc.arduino.cli.commands.PlatformUpgradeReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.PlatformUpgradeReq} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.PlatformUpgradeReq.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInstance(); + if (f != null) { + writer.writeMessage( + 1, + f, + commands_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.cc.arduino.cli.commands.Instance} + */ +proto.cc.arduino.cli.commands.PlatformUpgradeReq.prototype.getInstance = function() { + return /** @type{?proto.cc.arduino.cli.commands.Instance} */ ( + jspb.Message.getWrapperField(this, commands_common_pb.Instance, 1)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.Instance|undefined} value + * @return {!proto.cc.arduino.cli.commands.PlatformUpgradeReq} returns this +*/ +proto.cc.arduino.cli.commands.PlatformUpgradeReq.prototype.setInstance = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.PlatformUpgradeReq} returns this + */ +proto.cc.arduino.cli.commands.PlatformUpgradeReq.prototype.clearInstance = function() { + return this.setInstance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.PlatformUpgradeReq.prototype.hasInstance = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string platform_package = 2; + * @return {string} + */ +proto.cc.arduino.cli.commands.PlatformUpgradeReq.prototype.getPlatformPackage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.PlatformUpgradeReq} returns this + */ +proto.cc.arduino.cli.commands.PlatformUpgradeReq.prototype.setPlatformPackage = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string architecture = 3; + * @return {string} + */ +proto.cc.arduino.cli.commands.PlatformUpgradeReq.prototype.getArchitecture = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.PlatformUpgradeReq} returns this + */ +proto.cc.arduino.cli.commands.PlatformUpgradeReq.prototype.setArchitecture = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.PlatformUpgradeResp.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.PlatformUpgradeResp.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.PlatformUpgradeResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.PlatformUpgradeResp.toObject = function(includeInstance, msg) { + var f, obj = { + progress: (f = msg.getProgress()) && commands_common_pb.DownloadProgress.toObject(includeInstance, f), + taskProgress: (f = msg.getTaskProgress()) && commands_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.cc.arduino.cli.commands.PlatformUpgradeResp} + */ +proto.cc.arduino.cli.commands.PlatformUpgradeResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.PlatformUpgradeResp; + return proto.cc.arduino.cli.commands.PlatformUpgradeResp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.PlatformUpgradeResp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.PlatformUpgradeResp} + */ +proto.cc.arduino.cli.commands.PlatformUpgradeResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new commands_common_pb.DownloadProgress; + reader.readMessage(value,commands_common_pb.DownloadProgress.deserializeBinaryFromReader); + msg.setProgress(value); + break; + case 2: + var value = new commands_common_pb.TaskProgress; + reader.readMessage(value,commands_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.cc.arduino.cli.commands.PlatformUpgradeResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.PlatformUpgradeResp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.PlatformUpgradeResp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProgress(); + if (f != null) { + writer.writeMessage( + 1, + f, + commands_common_pb.DownloadProgress.serializeBinaryToWriter + ); + } + f = message.getTaskProgress(); + if (f != null) { + writer.writeMessage( + 2, + f, + commands_common_pb.TaskProgress.serializeBinaryToWriter + ); + } +}; + + +/** + * optional DownloadProgress progress = 1; + * @return {?proto.cc.arduino.cli.commands.DownloadProgress} + */ +proto.cc.arduino.cli.commands.PlatformUpgradeResp.prototype.getProgress = function() { + return /** @type{?proto.cc.arduino.cli.commands.DownloadProgress} */ ( + jspb.Message.getWrapperField(this, commands_common_pb.DownloadProgress, 1)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.DownloadProgress|undefined} value + * @return {!proto.cc.arduino.cli.commands.PlatformUpgradeResp} returns this +*/ +proto.cc.arduino.cli.commands.PlatformUpgradeResp.prototype.setProgress = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.PlatformUpgradeResp} returns this + */ +proto.cc.arduino.cli.commands.PlatformUpgradeResp.prototype.clearProgress = function() { + return this.setProgress(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.PlatformUpgradeResp.prototype.hasProgress = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional TaskProgress task_progress = 2; + * @return {?proto.cc.arduino.cli.commands.TaskProgress} + */ +proto.cc.arduino.cli.commands.PlatformUpgradeResp.prototype.getTaskProgress = function() { + return /** @type{?proto.cc.arduino.cli.commands.TaskProgress} */ ( + jspb.Message.getWrapperField(this, commands_common_pb.TaskProgress, 2)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.TaskProgress|undefined} value + * @return {!proto.cc.arduino.cli.commands.PlatformUpgradeResp} returns this +*/ +proto.cc.arduino.cli.commands.PlatformUpgradeResp.prototype.setTaskProgress = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.PlatformUpgradeResp} returns this + */ +proto.cc.arduino.cli.commands.PlatformUpgradeResp.prototype.clearTaskProgress = function() { + return this.setTaskProgress(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.PlatformUpgradeResp.prototype.hasTaskProgress = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.PlatformSearchReq.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.PlatformSearchReq.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.PlatformSearchReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.PlatformSearchReq.toObject = function(includeInstance, msg) { + var f, obj = { + instance: (f = msg.getInstance()) && commands_common_pb.Instance.toObject(includeInstance, f), + searchArgs: jspb.Message.getFieldWithDefault(msg, 2, ""), + allVersions: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cc.arduino.cli.commands.PlatformSearchReq} + */ +proto.cc.arduino.cli.commands.PlatformSearchReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.PlatformSearchReq; + return proto.cc.arduino.cli.commands.PlatformSearchReq.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.PlatformSearchReq} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.PlatformSearchReq} + */ +proto.cc.arduino.cli.commands.PlatformSearchReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new commands_common_pb.Instance; + reader.readMessage(value,commands_common_pb.Instance.deserializeBinaryFromReader); + msg.setInstance(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSearchArgs(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setAllVersions(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.commands.PlatformSearchReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.PlatformSearchReq} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.PlatformSearchReq.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInstance(); + if (f != null) { + writer.writeMessage( + 1, + f, + commands_common_pb.Instance.serializeBinaryToWriter + ); + } + f = message.getSearchArgs(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getAllVersions(); + if (f) { + writer.writeBool( + 3, + f + ); + } +}; + + +/** + * optional Instance instance = 1; + * @return {?proto.cc.arduino.cli.commands.Instance} + */ +proto.cc.arduino.cli.commands.PlatformSearchReq.prototype.getInstance = function() { + return /** @type{?proto.cc.arduino.cli.commands.Instance} */ ( + jspb.Message.getWrapperField(this, commands_common_pb.Instance, 1)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.Instance|undefined} value + * @return {!proto.cc.arduino.cli.commands.PlatformSearchReq} returns this +*/ +proto.cc.arduino.cli.commands.PlatformSearchReq.prototype.setInstance = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.PlatformSearchReq} returns this + */ +proto.cc.arduino.cli.commands.PlatformSearchReq.prototype.clearInstance = function() { + return this.setInstance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.PlatformSearchReq.prototype.hasInstance = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string search_args = 2; + * @return {string} + */ +proto.cc.arduino.cli.commands.PlatformSearchReq.prototype.getSearchArgs = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.PlatformSearchReq} returns this + */ +proto.cc.arduino.cli.commands.PlatformSearchReq.prototype.setSearchArgs = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional bool all_versions = 3; + * @return {boolean} + */ +proto.cc.arduino.cli.commands.PlatformSearchReq.prototype.getAllVersions = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cc.arduino.cli.commands.PlatformSearchReq} returns this + */ +proto.cc.arduino.cli.commands.PlatformSearchReq.prototype.setAllVersions = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cc.arduino.cli.commands.PlatformSearchResp.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.PlatformSearchResp.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.PlatformSearchResp.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.PlatformSearchResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.PlatformSearchResp.toObject = function(includeInstance, msg) { + var f, obj = { + searchOutputList: jspb.Message.toObjectList(msg.getSearchOutputList(), + proto.cc.arduino.cli.commands.Platform.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.cc.arduino.cli.commands.PlatformSearchResp} + */ +proto.cc.arduino.cli.commands.PlatformSearchResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.PlatformSearchResp; + return proto.cc.arduino.cli.commands.PlatformSearchResp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.PlatformSearchResp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.PlatformSearchResp} + */ +proto.cc.arduino.cli.commands.PlatformSearchResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cc.arduino.cli.commands.Platform; + reader.readMessage(value,proto.cc.arduino.cli.commands.Platform.deserializeBinaryFromReader); + msg.addSearchOutput(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.commands.PlatformSearchResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.PlatformSearchResp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.PlatformSearchResp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSearchOutputList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.cc.arduino.cli.commands.Platform.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Platform search_output = 1; + * @return {!Array} + */ +proto.cc.arduino.cli.commands.PlatformSearchResp.prototype.getSearchOutputList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cc.arduino.cli.commands.Platform, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cc.arduino.cli.commands.PlatformSearchResp} returns this +*/ +proto.cc.arduino.cli.commands.PlatformSearchResp.prototype.setSearchOutputList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cc.arduino.cli.commands.Platform=} opt_value + * @param {number=} opt_index + * @return {!proto.cc.arduino.cli.commands.Platform} + */ +proto.cc.arduino.cli.commands.PlatformSearchResp.prototype.addSearchOutput = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cc.arduino.cli.commands.Platform, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cc.arduino.cli.commands.PlatformSearchResp} returns this + */ +proto.cc.arduino.cli.commands.PlatformSearchResp.prototype.clearSearchOutputList = function() { + return this.setSearchOutputList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.PlatformListReq.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.PlatformListReq.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.PlatformListReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.PlatformListReq.toObject = function(includeInstance, msg) { + var f, obj = { + instance: (f = msg.getInstance()) && commands_common_pb.Instance.toObject(includeInstance, f), + updatableOnly: jspb.Message.getBooleanFieldWithDefault(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.cc.arduino.cli.commands.PlatformListReq} + */ +proto.cc.arduino.cli.commands.PlatformListReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.PlatformListReq; + return proto.cc.arduino.cli.commands.PlatformListReq.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.PlatformListReq} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.PlatformListReq} + */ +proto.cc.arduino.cli.commands.PlatformListReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new commands_common_pb.Instance; + reader.readMessage(value,commands_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.cc.arduino.cli.commands.PlatformListReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.PlatformListReq} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.PlatformListReq.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInstance(); + if (f != null) { + writer.writeMessage( + 1, + f, + commands_common_pb.Instance.serializeBinaryToWriter + ); + } + f = message.getUpdatableOnly(); + if (f) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * optional Instance instance = 1; + * @return {?proto.cc.arduino.cli.commands.Instance} + */ +proto.cc.arduino.cli.commands.PlatformListReq.prototype.getInstance = function() { + return /** @type{?proto.cc.arduino.cli.commands.Instance} */ ( + jspb.Message.getWrapperField(this, commands_common_pb.Instance, 1)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.Instance|undefined} value + * @return {!proto.cc.arduino.cli.commands.PlatformListReq} returns this +*/ +proto.cc.arduino.cli.commands.PlatformListReq.prototype.setInstance = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.PlatformListReq} returns this + */ +proto.cc.arduino.cli.commands.PlatformListReq.prototype.clearInstance = function() { + return this.setInstance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.PlatformListReq.prototype.hasInstance = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bool updatable_only = 2; + * @return {boolean} + */ +proto.cc.arduino.cli.commands.PlatformListReq.prototype.getUpdatableOnly = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cc.arduino.cli.commands.PlatformListReq} returns this + */ +proto.cc.arduino.cli.commands.PlatformListReq.prototype.setUpdatableOnly = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cc.arduino.cli.commands.PlatformListResp.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.PlatformListResp.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.PlatformListResp.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.PlatformListResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.PlatformListResp.toObject = function(includeInstance, msg) { + var f, obj = { + installedPlatformList: jspb.Message.toObjectList(msg.getInstalledPlatformList(), + proto.cc.arduino.cli.commands.Platform.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.cc.arduino.cli.commands.PlatformListResp} + */ +proto.cc.arduino.cli.commands.PlatformListResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.PlatformListResp; + return proto.cc.arduino.cli.commands.PlatformListResp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.PlatformListResp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.PlatformListResp} + */ +proto.cc.arduino.cli.commands.PlatformListResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cc.arduino.cli.commands.Platform; + reader.readMessage(value,proto.cc.arduino.cli.commands.Platform.deserializeBinaryFromReader); + msg.addInstalledPlatform(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.commands.PlatformListResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.PlatformListResp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.PlatformListResp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInstalledPlatformList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.cc.arduino.cli.commands.Platform.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Platform installed_platform = 1; + * @return {!Array} + */ +proto.cc.arduino.cli.commands.PlatformListResp.prototype.getInstalledPlatformList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cc.arduino.cli.commands.Platform, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cc.arduino.cli.commands.PlatformListResp} returns this +*/ +proto.cc.arduino.cli.commands.PlatformListResp.prototype.setInstalledPlatformList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cc.arduino.cli.commands.Platform=} opt_value + * @param {number=} opt_index + * @return {!proto.cc.arduino.cli.commands.Platform} + */ +proto.cc.arduino.cli.commands.PlatformListResp.prototype.addInstalledPlatform = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cc.arduino.cli.commands.Platform, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cc.arduino.cli.commands.PlatformListResp} returns this + */ +proto.cc.arduino.cli.commands.PlatformListResp.prototype.clearInstalledPlatformList = function() { + return this.setInstalledPlatformList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cc.arduino.cli.commands.Platform.repeatedFields_ = [8]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.Platform.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.Platform.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.Platform} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.Platform.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, ""), + maintainer: jspb.Message.getFieldWithDefault(msg, 5, ""), + website: jspb.Message.getFieldWithDefault(msg, 6, ""), + email: jspb.Message.getFieldWithDefault(msg, 7, ""), + boardsList: jspb.Message.toObjectList(msg.getBoardsList(), + proto.cc.arduino.cli.commands.Board.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.cc.arduino.cli.commands.Platform} + */ +proto.cc.arduino.cli.commands.Platform.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.Platform; + return proto.cc.arduino.cli.commands.Platform.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.Platform} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.Platform} + */ +proto.cc.arduino.cli.commands.Platform.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; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setMaintainer(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setWebsite(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setEmail(value); + break; + case 8: + var value = new proto.cc.arduino.cli.commands.Board; + reader.readMessage(value,proto.cc.arduino.cli.commands.Board.deserializeBinaryFromReader); + msg.addBoards(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.commands.Platform.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.Platform.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cc.arduino.cli.commands.Platform} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.Platform.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 + ); + } + f = message.getMaintainer(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getWebsite(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getEmail(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } + f = message.getBoardsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 8, + f, + proto.cc.arduino.cli.commands.Board.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string ID = 1; + * @return {string} + */ +proto.cc.arduino.cli.commands.Platform.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.Platform} returns this + */ +proto.cc.arduino.cli.commands.Platform.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string Installed = 2; + * @return {string} + */ +proto.cc.arduino.cli.commands.Platform.prototype.getInstalled = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.Platform} returns this + */ +proto.cc.arduino.cli.commands.Platform.prototype.setInstalled = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string Latest = 3; + * @return {string} + */ +proto.cc.arduino.cli.commands.Platform.prototype.getLatest = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.Platform} returns this + */ +proto.cc.arduino.cli.commands.Platform.prototype.setLatest = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string Name = 4; + * @return {string} + */ +proto.cc.arduino.cli.commands.Platform.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.Platform} returns this + */ +proto.cc.arduino.cli.commands.Platform.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string Maintainer = 5; + * @return {string} + */ +proto.cc.arduino.cli.commands.Platform.prototype.getMaintainer = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.Platform} returns this + */ +proto.cc.arduino.cli.commands.Platform.prototype.setMaintainer = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional string Website = 6; + * @return {string} + */ +proto.cc.arduino.cli.commands.Platform.prototype.getWebsite = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.Platform} returns this + */ +proto.cc.arduino.cli.commands.Platform.prototype.setWebsite = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional string Email = 7; + * @return {string} + */ +proto.cc.arduino.cli.commands.Platform.prototype.getEmail = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.Platform} returns this + */ +proto.cc.arduino.cli.commands.Platform.prototype.setEmail = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + +/** + * repeated Board Boards = 8; + * @return {!Array} + */ +proto.cc.arduino.cli.commands.Platform.prototype.getBoardsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cc.arduino.cli.commands.Board, 8)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cc.arduino.cli.commands.Platform} returns this +*/ +proto.cc.arduino.cli.commands.Platform.prototype.setBoardsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 8, value); +}; + + +/** + * @param {!proto.cc.arduino.cli.commands.Board=} opt_value + * @param {number=} opt_index + * @return {!proto.cc.arduino.cli.commands.Board} + */ +proto.cc.arduino.cli.commands.Platform.prototype.addBoards = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 8, opt_value, proto.cc.arduino.cli.commands.Board, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cc.arduino.cli.commands.Platform} returns this + */ +proto.cc.arduino.cli.commands.Platform.prototype.clearBoardsList = function() { + return this.setBoardsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.Board.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.Board.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.Board} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.Board.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + 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.cc.arduino.cli.commands.Board} + */ +proto.cc.arduino.cli.commands.Board.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.Board; + return proto.cc.arduino.cli.commands.Board.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.Board} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.Board} + */ +proto.cc.arduino.cli.commands.Board.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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.commands.Board.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.Board.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cc.arduino.cli.commands.Board} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.Board.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 + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.cc.arduino.cli.commands.Board.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.Board} returns this + */ +proto.cc.arduino.cli.commands.Board.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string fqbn = 2; + * @return {string} + */ +proto.cc.arduino.cli.commands.Board.prototype.getFqbn = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.Board} returns this + */ +proto.cc.arduino.cli.commands.Board.prototype.setFqbn = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +goog.object.extend(exports, proto.cc.arduino.cli.commands); diff --git a/arduino-ide-extension/src/node/cli-protocol/commands/lib_grpc_pb.js b/arduino-ide-extension/src/node/cli-protocol/commands/lib_grpc_pb.js new file mode 100644 index 00000000..97b3a246 --- /dev/null +++ b/arduino-ide-extension/src/node/cli-protocol/commands/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/commands/lib_pb.d.ts b/arduino-ide-extension/src/node/cli-protocol/commands/lib_pb.d.ts new file mode 100644 index 00000000..3471822d --- /dev/null +++ b/arduino-ide-extension/src/node/cli-protocol/commands/lib_pb.d.ts @@ -0,0 +1,771 @@ +// package: cc.arduino.cli.commands +// file: commands/lib.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; +import * as commands_common_pb from "../commands/common_pb"; + +export class LibraryDownloadReq extends jspb.Message { + + hasInstance(): boolean; + clearInstance(): void; + getInstance(): commands_common_pb.Instance | undefined; + setInstance(value?: commands_common_pb.Instance): LibraryDownloadReq; + + getName(): string; + setName(value: string): LibraryDownloadReq; + + getVersion(): string; + setVersion(value: string): LibraryDownloadReq; + + + 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?: commands_common_pb.Instance.AsObject, + name: string, + version: string, + } +} + +export class LibraryDownloadResp extends jspb.Message { + + hasProgress(): boolean; + clearProgress(): void; + getProgress(): commands_common_pb.DownloadProgress | undefined; + setProgress(value?: commands_common_pb.DownloadProgress): LibraryDownloadResp; + + + 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?: commands_common_pb.DownloadProgress.AsObject, + } +} + +export class LibraryInstallReq extends jspb.Message { + + hasInstance(): boolean; + clearInstance(): void; + getInstance(): commands_common_pb.Instance | undefined; + setInstance(value?: commands_common_pb.Instance): LibraryInstallReq; + + getName(): string; + setName(value: string): LibraryInstallReq; + + getVersion(): string; + setVersion(value: string): LibraryInstallReq; + + + 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?: commands_common_pb.Instance.AsObject, + name: string, + version: string, + } +} + +export class LibraryInstallResp extends jspb.Message { + + hasProgress(): boolean; + clearProgress(): void; + getProgress(): commands_common_pb.DownloadProgress | undefined; + setProgress(value?: commands_common_pb.DownloadProgress): LibraryInstallResp; + + + hasTaskProgress(): boolean; + clearTaskProgress(): void; + getTaskProgress(): commands_common_pb.TaskProgress | undefined; + setTaskProgress(value?: commands_common_pb.TaskProgress): LibraryInstallResp; + + + 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?: commands_common_pb.DownloadProgress.AsObject, + taskProgress?: commands_common_pb.TaskProgress.AsObject, + } +} + +export class LibraryUninstallReq extends jspb.Message { + + hasInstance(): boolean; + clearInstance(): void; + getInstance(): commands_common_pb.Instance | undefined; + setInstance(value?: commands_common_pb.Instance): LibraryUninstallReq; + + getName(): string; + setName(value: string): LibraryUninstallReq; + + getVersion(): string; + setVersion(value: string): LibraryUninstallReq; + + + 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?: commands_common_pb.Instance.AsObject, + name: string, + version: string, + } +} + +export class LibraryUninstallResp extends jspb.Message { + + hasTaskProgress(): boolean; + clearTaskProgress(): void; + getTaskProgress(): commands_common_pb.TaskProgress | undefined; + setTaskProgress(value?: commands_common_pb.TaskProgress): LibraryUninstallResp; + + + 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?: commands_common_pb.TaskProgress.AsObject, + } +} + +export class LibraryUpgradeAllReq extends jspb.Message { + + hasInstance(): boolean; + clearInstance(): void; + getInstance(): commands_common_pb.Instance | undefined; + setInstance(value?: commands_common_pb.Instance): LibraryUpgradeAllReq; + + + 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?: commands_common_pb.Instance.AsObject, + } +} + +export class LibraryUpgradeAllResp extends jspb.Message { + + hasProgress(): boolean; + clearProgress(): void; + getProgress(): commands_common_pb.DownloadProgress | undefined; + setProgress(value?: commands_common_pb.DownloadProgress): LibraryUpgradeAllResp; + + + hasTaskProgress(): boolean; + clearTaskProgress(): void; + getTaskProgress(): commands_common_pb.TaskProgress | undefined; + setTaskProgress(value?: commands_common_pb.TaskProgress): LibraryUpgradeAllResp; + + + 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?: commands_common_pb.DownloadProgress.AsObject, + taskProgress?: commands_common_pb.TaskProgress.AsObject, + } +} + +export class LibraryResolveDependenciesReq extends jspb.Message { + + hasInstance(): boolean; + clearInstance(): void; + getInstance(): commands_common_pb.Instance | undefined; + setInstance(value?: commands_common_pb.Instance): LibraryResolveDependenciesReq; + + getName(): string; + setName(value: string): LibraryResolveDependenciesReq; + + getVersion(): string; + setVersion(value: string): LibraryResolveDependenciesReq; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): LibraryResolveDependenciesReq.AsObject; + static toObject(includeInstance: boolean, msg: LibraryResolveDependenciesReq): LibraryResolveDependenciesReq.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: LibraryResolveDependenciesReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): LibraryResolveDependenciesReq; + static deserializeBinaryFromReader(message: LibraryResolveDependenciesReq, reader: jspb.BinaryReader): LibraryResolveDependenciesReq; +} + +export namespace LibraryResolveDependenciesReq { + export type AsObject = { + instance?: commands_common_pb.Instance.AsObject, + name: string, + version: string, + } +} + +export class LibraryResolveDependenciesResp extends jspb.Message { + clearDependenciesList(): void; + getDependenciesList(): Array; + setDependenciesList(value: Array): LibraryResolveDependenciesResp; + addDependencies(value?: LibraryDependencyStatus, index?: number): LibraryDependencyStatus; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): LibraryResolveDependenciesResp.AsObject; + static toObject(includeInstance: boolean, msg: LibraryResolveDependenciesResp): LibraryResolveDependenciesResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: LibraryResolveDependenciesResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): LibraryResolveDependenciesResp; + static deserializeBinaryFromReader(message: LibraryResolveDependenciesResp, reader: jspb.BinaryReader): LibraryResolveDependenciesResp; +} + +export namespace LibraryResolveDependenciesResp { + export type AsObject = { + dependenciesList: Array, + } +} + +export class LibraryDependencyStatus extends jspb.Message { + getName(): string; + setName(value: string): LibraryDependencyStatus; + + getVersionrequired(): string; + setVersionrequired(value: string): LibraryDependencyStatus; + + getVersioninstalled(): string; + setVersioninstalled(value: string): LibraryDependencyStatus; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): LibraryDependencyStatus.AsObject; + static toObject(includeInstance: boolean, msg: LibraryDependencyStatus): LibraryDependencyStatus.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: LibraryDependencyStatus, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): LibraryDependencyStatus; + static deserializeBinaryFromReader(message: LibraryDependencyStatus, reader: jspb.BinaryReader): LibraryDependencyStatus; +} + +export namespace LibraryDependencyStatus { + export type AsObject = { + name: string, + versionrequired: string, + versioninstalled: string, + } +} + +export class LibrarySearchReq extends jspb.Message { + + hasInstance(): boolean; + clearInstance(): void; + getInstance(): commands_common_pb.Instance | undefined; + setInstance(value?: commands_common_pb.Instance): LibrarySearchReq; + + getQuery(): string; + setQuery(value: string): LibrarySearchReq; + + + 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?: commands_common_pb.Instance.AsObject, + query: string, + } +} + +export class LibrarySearchResp extends jspb.Message { + clearLibrariesList(): void; + getLibrariesList(): Array; + setLibrariesList(value: Array): LibrarySearchResp; + addLibraries(value?: SearchedLibrary, index?: number): SearchedLibrary; + + getStatus(): LibrarySearchStatus; + setStatus(value: LibrarySearchStatus): LibrarySearchResp; + + + 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 = { + librariesList: Array, + status: LibrarySearchStatus, + } +} + +export class SearchedLibrary extends jspb.Message { + getName(): string; + setName(value: string): SearchedLibrary; + + + getReleasesMap(): jspb.Map; + clearReleasesMap(): void; + + + hasLatest(): boolean; + clearLatest(): void; + getLatest(): LibraryRelease | undefined; + setLatest(value?: LibraryRelease): SearchedLibrary; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SearchedLibrary.AsObject; + static toObject(includeInstance: boolean, msg: SearchedLibrary): SearchedLibrary.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SearchedLibrary, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SearchedLibrary; + static deserializeBinaryFromReader(message: SearchedLibrary, reader: jspb.BinaryReader): SearchedLibrary; +} + +export namespace SearchedLibrary { + export type AsObject = { + name: string, + + releasesMap: Array<[string, LibraryRelease.AsObject]>, + latest?: LibraryRelease.AsObject, + } +} + +export class LibraryRelease extends jspb.Message { + getAuthor(): string; + setAuthor(value: string): LibraryRelease; + + getVersion(): string; + setVersion(value: string): LibraryRelease; + + getMaintainer(): string; + setMaintainer(value: string): LibraryRelease; + + getSentence(): string; + setSentence(value: string): LibraryRelease; + + getParagraph(): string; + setParagraph(value: string): LibraryRelease; + + getWebsite(): string; + setWebsite(value: string): LibraryRelease; + + getCategory(): string; + setCategory(value: string): LibraryRelease; + + clearArchitecturesList(): void; + getArchitecturesList(): Array; + setArchitecturesList(value: Array): LibraryRelease; + addArchitectures(value: string, index?: number): string; + + clearTypesList(): void; + getTypesList(): Array; + setTypesList(value: Array): LibraryRelease; + addTypes(value: string, index?: number): string; + + + hasResources(): boolean; + clearResources(): void; + getResources(): DownloadResource | undefined; + setResources(value?: DownloadResource): LibraryRelease; + + getLicense(): string; + setLicense(value: string): LibraryRelease; + + clearProvidesIncludesList(): void; + getProvidesIncludesList(): Array; + setProvidesIncludesList(value: Array): LibraryRelease; + addProvidesIncludes(value: string, index?: number): string; + + clearDependenciesList(): void; + getDependenciesList(): Array; + setDependenciesList(value: Array): LibraryRelease; + addDependencies(value?: LibraryDependency, index?: number): LibraryDependency; + + + 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, + license: string, + providesIncludesList: Array, + dependenciesList: Array, + } +} + +export class LibraryDependency extends jspb.Message { + getName(): string; + setName(value: string): LibraryDependency; + + getVersionConstraint(): string; + setVersionConstraint(value: string): LibraryDependency; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): LibraryDependency.AsObject; + static toObject(includeInstance: boolean, msg: LibraryDependency): LibraryDependency.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: LibraryDependency, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): LibraryDependency; + static deserializeBinaryFromReader(message: LibraryDependency, reader: jspb.BinaryReader): LibraryDependency; +} + +export namespace LibraryDependency { + export type AsObject = { + name: string, + versionConstraint: string, + } +} + +export class DownloadResource extends jspb.Message { + getUrl(): string; + setUrl(value: string): DownloadResource; + + getArchivefilename(): string; + setArchivefilename(value: string): DownloadResource; + + getChecksum(): string; + setChecksum(value: string): DownloadResource; + + getSize(): number; + setSize(value: number): DownloadResource; + + getCachepath(): string; + setCachepath(value: string): DownloadResource; + + + 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, + } +} + +export class LibraryListReq extends jspb.Message { + + hasInstance(): boolean; + clearInstance(): void; + getInstance(): commands_common_pb.Instance | undefined; + setInstance(value?: commands_common_pb.Instance): LibraryListReq; + + getAll(): boolean; + setAll(value: boolean): LibraryListReq; + + getUpdatable(): boolean; + setUpdatable(value: boolean): LibraryListReq; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): LibraryListReq.AsObject; + static toObject(includeInstance: boolean, msg: LibraryListReq): LibraryListReq.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: LibraryListReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): LibraryListReq; + static deserializeBinaryFromReader(message: LibraryListReq, reader: jspb.BinaryReader): LibraryListReq; +} + +export namespace LibraryListReq { + export type AsObject = { + instance?: commands_common_pb.Instance.AsObject, + all: boolean, + updatable: boolean, + } +} + +export class LibraryListResp extends jspb.Message { + clearInstalledLibraryList(): void; + getInstalledLibraryList(): Array; + setInstalledLibraryList(value: Array): LibraryListResp; + addInstalledLibrary(value?: InstalledLibrary, index?: number): InstalledLibrary; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): LibraryListResp.AsObject; + static toObject(includeInstance: boolean, msg: LibraryListResp): LibraryListResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: LibraryListResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): LibraryListResp; + static deserializeBinaryFromReader(message: LibraryListResp, reader: jspb.BinaryReader): LibraryListResp; +} + +export namespace LibraryListResp { + export type AsObject = { + installedLibraryList: Array, + } +} + +export class InstalledLibrary extends jspb.Message { + + hasLibrary(): boolean; + clearLibrary(): void; + getLibrary(): Library | undefined; + setLibrary(value?: Library): InstalledLibrary; + + + hasRelease(): boolean; + clearRelease(): void; + getRelease(): LibraryRelease | undefined; + setRelease(value?: LibraryRelease): InstalledLibrary; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): InstalledLibrary.AsObject; + static toObject(includeInstance: boolean, msg: InstalledLibrary): InstalledLibrary.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: InstalledLibrary, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): InstalledLibrary; + static deserializeBinaryFromReader(message: InstalledLibrary, reader: jspb.BinaryReader): InstalledLibrary; +} + +export namespace InstalledLibrary { + export type AsObject = { + library?: Library.AsObject, + release?: LibraryRelease.AsObject, + } +} + +export class Library extends jspb.Message { + getName(): string; + setName(value: string): Library; + + getAuthor(): string; + setAuthor(value: string): Library; + + getMaintainer(): string; + setMaintainer(value: string): Library; + + getSentence(): string; + setSentence(value: string): Library; + + getParagraph(): string; + setParagraph(value: string): Library; + + getWebsite(): string; + setWebsite(value: string): Library; + + getCategory(): string; + setCategory(value: string): Library; + + clearArchitecturesList(): void; + getArchitecturesList(): Array; + setArchitecturesList(value: Array): Library; + addArchitectures(value: string, index?: number): string; + + clearTypesList(): void; + getTypesList(): Array; + setTypesList(value: Array): Library; + addTypes(value: string, index?: number): string; + + getInstallDir(): string; + setInstallDir(value: string): Library; + + getSourceDir(): string; + setSourceDir(value: string): Library; + + getUtilityDir(): string; + setUtilityDir(value: string): Library; + + getContainerPlatform(): string; + setContainerPlatform(value: string): Library; + + getRealName(): string; + setRealName(value: string): Library; + + getDotALinkage(): boolean; + setDotALinkage(value: boolean): Library; + + getPrecompiled(): boolean; + setPrecompiled(value: boolean): Library; + + getLdFlags(): string; + setLdFlags(value: string): Library; + + getIsLegacy(): boolean; + setIsLegacy(value: boolean): Library; + + getVersion(): string; + setVersion(value: string): Library; + + getLicense(): string; + setLicense(value: string): Library; + + + getPropertiesMap(): jspb.Map; + clearPropertiesMap(): void; + + getLocation(): LibraryLocation; + setLocation(value: LibraryLocation): Library; + + getLayout(): LibraryLayout; + setLayout(value: LibraryLayout): Library; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Library.AsObject; + static toObject(includeInstance: boolean, msg: Library): Library.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Library, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Library; + static deserializeBinaryFromReader(message: Library, reader: jspb.BinaryReader): Library; +} + +export namespace Library { + export type AsObject = { + name: string, + author: string, + maintainer: string, + sentence: string, + paragraph: string, + website: string, + category: string, + architecturesList: Array, + typesList: Array, + installDir: string, + sourceDir: string, + utilityDir: string, + containerPlatform: string, + realName: string, + dotALinkage: boolean, + precompiled: boolean, + ldFlags: string, + isLegacy: boolean, + version: string, + license: string, + + propertiesMap: Array<[string, string]>, + location: LibraryLocation, + layout: LibraryLayout, + } +} + +export enum LibrarySearchStatus { + FAILED = 0, + SUCCESS = 1, +} + +export enum LibraryLayout { + FLAT_LAYOUT = 0, + RECURSIVE_LAYOUT = 1, +} + +export enum LibraryLocation { + IDE_BUILTIN = 0, + USER = 1, + PLATFORM_BUILTIN = 2, + REFERENCED_PLATFORM_BUILTIN = 3, +} diff --git a/arduino-ide-extension/src/node/cli-protocol/commands/lib_pb.js b/arduino-ide-extension/src/node/cli-protocol/commands/lib_pb.js new file mode 100644 index 00000000..b202da8d --- /dev/null +++ b/arduino-ide-extension/src/node/cli-protocol/commands/lib_pb.js @@ -0,0 +1,5563 @@ +// source: commands/lib.proto +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var commands_common_pb = require('../commands/common_pb.js'); +goog.object.extend(proto, commands_common_pb); +goog.exportSymbol('proto.cc.arduino.cli.commands.DownloadResource', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.InstalledLibrary', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.Library', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.LibraryDependency', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.LibraryDependencyStatus', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.LibraryDownloadReq', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.LibraryDownloadResp', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.LibraryInstallReq', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.LibraryInstallResp', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.LibraryLayout', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.LibraryListReq', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.LibraryListResp', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.LibraryLocation', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.LibraryRelease', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.LibraryResolveDependenciesReq', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.LibraryResolveDependenciesResp', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.LibrarySearchReq', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.LibrarySearchResp', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.LibrarySearchStatus', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.LibraryUninstallReq', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.LibraryUninstallResp', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.LibraryUpgradeAllReq', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.LibraryUpgradeAllResp', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.SearchedLibrary', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.LibraryDownloadReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.LibraryDownloadReq, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.LibraryDownloadReq.displayName = 'proto.cc.arduino.cli.commands.LibraryDownloadReq'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.LibraryDownloadResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.LibraryDownloadResp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.LibraryDownloadResp.displayName = 'proto.cc.arduino.cli.commands.LibraryDownloadResp'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.LibraryInstallReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.LibraryInstallReq, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.LibraryInstallReq.displayName = 'proto.cc.arduino.cli.commands.LibraryInstallReq'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.LibraryInstallResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.LibraryInstallResp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.LibraryInstallResp.displayName = 'proto.cc.arduino.cli.commands.LibraryInstallResp'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.LibraryUninstallReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.LibraryUninstallReq, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.LibraryUninstallReq.displayName = 'proto.cc.arduino.cli.commands.LibraryUninstallReq'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.LibraryUninstallResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.LibraryUninstallResp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.LibraryUninstallResp.displayName = 'proto.cc.arduino.cli.commands.LibraryUninstallResp'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.LibraryUpgradeAllReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.LibraryUpgradeAllReq, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.LibraryUpgradeAllReq.displayName = 'proto.cc.arduino.cli.commands.LibraryUpgradeAllReq'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.LibraryUpgradeAllResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.LibraryUpgradeAllResp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.LibraryUpgradeAllResp.displayName = 'proto.cc.arduino.cli.commands.LibraryUpgradeAllResp'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.LibraryResolveDependenciesReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.LibraryResolveDependenciesReq, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.LibraryResolveDependenciesReq.displayName = 'proto.cc.arduino.cli.commands.LibraryResolveDependenciesReq'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.LibraryResolveDependenciesResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cc.arduino.cli.commands.LibraryResolveDependenciesResp.repeatedFields_, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.LibraryResolveDependenciesResp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.LibraryResolveDependenciesResp.displayName = 'proto.cc.arduino.cli.commands.LibraryResolveDependenciesResp'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.LibraryDependencyStatus = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.LibraryDependencyStatus, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.LibraryDependencyStatus.displayName = 'proto.cc.arduino.cli.commands.LibraryDependencyStatus'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.LibrarySearchReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.LibrarySearchReq, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.LibrarySearchReq.displayName = 'proto.cc.arduino.cli.commands.LibrarySearchReq'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.LibrarySearchResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cc.arduino.cli.commands.LibrarySearchResp.repeatedFields_, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.LibrarySearchResp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.LibrarySearchResp.displayName = 'proto.cc.arduino.cli.commands.LibrarySearchResp'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.SearchedLibrary = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.SearchedLibrary, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.SearchedLibrary.displayName = 'proto.cc.arduino.cli.commands.SearchedLibrary'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.LibraryRelease = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cc.arduino.cli.commands.LibraryRelease.repeatedFields_, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.LibraryRelease, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.LibraryRelease.displayName = 'proto.cc.arduino.cli.commands.LibraryRelease'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.LibraryDependency = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.LibraryDependency, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.LibraryDependency.displayName = 'proto.cc.arduino.cli.commands.LibraryDependency'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.DownloadResource = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.DownloadResource, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.DownloadResource.displayName = 'proto.cc.arduino.cli.commands.DownloadResource'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.LibraryListReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.LibraryListReq, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.LibraryListReq.displayName = 'proto.cc.arduino.cli.commands.LibraryListReq'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.LibraryListResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cc.arduino.cli.commands.LibraryListResp.repeatedFields_, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.LibraryListResp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.LibraryListResp.displayName = 'proto.cc.arduino.cli.commands.LibraryListResp'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.InstalledLibrary = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.InstalledLibrary, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.InstalledLibrary.displayName = 'proto.cc.arduino.cli.commands.InstalledLibrary'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.Library = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cc.arduino.cli.commands.Library.repeatedFields_, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.Library, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.Library.displayName = 'proto.cc.arduino.cli.commands.Library'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.LibraryDownloadReq.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.LibraryDownloadReq.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.LibraryDownloadReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.LibraryDownloadReq.toObject = function(includeInstance, msg) { + var f, obj = { + instance: (f = msg.getInstance()) && commands_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.cc.arduino.cli.commands.LibraryDownloadReq} + */ +proto.cc.arduino.cli.commands.LibraryDownloadReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.LibraryDownloadReq; + return proto.cc.arduino.cli.commands.LibraryDownloadReq.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.LibraryDownloadReq} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.LibraryDownloadReq} + */ +proto.cc.arduino.cli.commands.LibraryDownloadReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new commands_common_pb.Instance; + reader.readMessage(value,commands_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.cc.arduino.cli.commands.LibraryDownloadReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.LibraryDownloadReq} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.LibraryDownloadReq.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInstance(); + if (f != null) { + writer.writeMessage( + 1, + f, + commands_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.cc.arduino.cli.commands.Instance} + */ +proto.cc.arduino.cli.commands.LibraryDownloadReq.prototype.getInstance = function() { + return /** @type{?proto.cc.arduino.cli.commands.Instance} */ ( + jspb.Message.getWrapperField(this, commands_common_pb.Instance, 1)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.Instance|undefined} value + * @return {!proto.cc.arduino.cli.commands.LibraryDownloadReq} returns this +*/ +proto.cc.arduino.cli.commands.LibraryDownloadReq.prototype.setInstance = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.LibraryDownloadReq} returns this + */ +proto.cc.arduino.cli.commands.LibraryDownloadReq.prototype.clearInstance = function() { + return this.setInstance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.LibraryDownloadReq.prototype.hasInstance = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string name = 2; + * @return {string} + */ +proto.cc.arduino.cli.commands.LibraryDownloadReq.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.LibraryDownloadReq} returns this + */ +proto.cc.arduino.cli.commands.LibraryDownloadReq.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string version = 3; + * @return {string} + */ +proto.cc.arduino.cli.commands.LibraryDownloadReq.prototype.getVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.LibraryDownloadReq} returns this + */ +proto.cc.arduino.cli.commands.LibraryDownloadReq.prototype.setVersion = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.LibraryDownloadResp.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.LibraryDownloadResp.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.LibraryDownloadResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.LibraryDownloadResp.toObject = function(includeInstance, msg) { + var f, obj = { + progress: (f = msg.getProgress()) && commands_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.cc.arduino.cli.commands.LibraryDownloadResp} + */ +proto.cc.arduino.cli.commands.LibraryDownloadResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.LibraryDownloadResp; + return proto.cc.arduino.cli.commands.LibraryDownloadResp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.LibraryDownloadResp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.LibraryDownloadResp} + */ +proto.cc.arduino.cli.commands.LibraryDownloadResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new commands_common_pb.DownloadProgress; + reader.readMessage(value,commands_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.cc.arduino.cli.commands.LibraryDownloadResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.LibraryDownloadResp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.LibraryDownloadResp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProgress(); + if (f != null) { + writer.writeMessage( + 1, + f, + commands_common_pb.DownloadProgress.serializeBinaryToWriter + ); + } +}; + + +/** + * optional DownloadProgress progress = 1; + * @return {?proto.cc.arduino.cli.commands.DownloadProgress} + */ +proto.cc.arduino.cli.commands.LibraryDownloadResp.prototype.getProgress = function() { + return /** @type{?proto.cc.arduino.cli.commands.DownloadProgress} */ ( + jspb.Message.getWrapperField(this, commands_common_pb.DownloadProgress, 1)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.DownloadProgress|undefined} value + * @return {!proto.cc.arduino.cli.commands.LibraryDownloadResp} returns this +*/ +proto.cc.arduino.cli.commands.LibraryDownloadResp.prototype.setProgress = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.LibraryDownloadResp} returns this + */ +proto.cc.arduino.cli.commands.LibraryDownloadResp.prototype.clearProgress = function() { + return this.setProgress(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.LibraryDownloadResp.prototype.hasProgress = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.LibraryInstallReq.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.LibraryInstallReq.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.LibraryInstallReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.LibraryInstallReq.toObject = function(includeInstance, msg) { + var f, obj = { + instance: (f = msg.getInstance()) && commands_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.cc.arduino.cli.commands.LibraryInstallReq} + */ +proto.cc.arduino.cli.commands.LibraryInstallReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.LibraryInstallReq; + return proto.cc.arduino.cli.commands.LibraryInstallReq.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.LibraryInstallReq} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.LibraryInstallReq} + */ +proto.cc.arduino.cli.commands.LibraryInstallReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new commands_common_pb.Instance; + reader.readMessage(value,commands_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.cc.arduino.cli.commands.LibraryInstallReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.LibraryInstallReq} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.LibraryInstallReq.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInstance(); + if (f != null) { + writer.writeMessage( + 1, + f, + commands_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.cc.arduino.cli.commands.Instance} + */ +proto.cc.arduino.cli.commands.LibraryInstallReq.prototype.getInstance = function() { + return /** @type{?proto.cc.arduino.cli.commands.Instance} */ ( + jspb.Message.getWrapperField(this, commands_common_pb.Instance, 1)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.Instance|undefined} value + * @return {!proto.cc.arduino.cli.commands.LibraryInstallReq} returns this +*/ +proto.cc.arduino.cli.commands.LibraryInstallReq.prototype.setInstance = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.LibraryInstallReq} returns this + */ +proto.cc.arduino.cli.commands.LibraryInstallReq.prototype.clearInstance = function() { + return this.setInstance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.LibraryInstallReq.prototype.hasInstance = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string name = 2; + * @return {string} + */ +proto.cc.arduino.cli.commands.LibraryInstallReq.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.LibraryInstallReq} returns this + */ +proto.cc.arduino.cli.commands.LibraryInstallReq.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string version = 3; + * @return {string} + */ +proto.cc.arduino.cli.commands.LibraryInstallReq.prototype.getVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.LibraryInstallReq} returns this + */ +proto.cc.arduino.cli.commands.LibraryInstallReq.prototype.setVersion = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.LibraryInstallResp.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.LibraryInstallResp.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.LibraryInstallResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.LibraryInstallResp.toObject = function(includeInstance, msg) { + var f, obj = { + progress: (f = msg.getProgress()) && commands_common_pb.DownloadProgress.toObject(includeInstance, f), + taskProgress: (f = msg.getTaskProgress()) && commands_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.cc.arduino.cli.commands.LibraryInstallResp} + */ +proto.cc.arduino.cli.commands.LibraryInstallResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.LibraryInstallResp; + return proto.cc.arduino.cli.commands.LibraryInstallResp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.LibraryInstallResp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.LibraryInstallResp} + */ +proto.cc.arduino.cli.commands.LibraryInstallResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new commands_common_pb.DownloadProgress; + reader.readMessage(value,commands_common_pb.DownloadProgress.deserializeBinaryFromReader); + msg.setProgress(value); + break; + case 2: + var value = new commands_common_pb.TaskProgress; + reader.readMessage(value,commands_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.cc.arduino.cli.commands.LibraryInstallResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.LibraryInstallResp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.LibraryInstallResp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProgress(); + if (f != null) { + writer.writeMessage( + 1, + f, + commands_common_pb.DownloadProgress.serializeBinaryToWriter + ); + } + f = message.getTaskProgress(); + if (f != null) { + writer.writeMessage( + 2, + f, + commands_common_pb.TaskProgress.serializeBinaryToWriter + ); + } +}; + + +/** + * optional DownloadProgress progress = 1; + * @return {?proto.cc.arduino.cli.commands.DownloadProgress} + */ +proto.cc.arduino.cli.commands.LibraryInstallResp.prototype.getProgress = function() { + return /** @type{?proto.cc.arduino.cli.commands.DownloadProgress} */ ( + jspb.Message.getWrapperField(this, commands_common_pb.DownloadProgress, 1)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.DownloadProgress|undefined} value + * @return {!proto.cc.arduino.cli.commands.LibraryInstallResp} returns this +*/ +proto.cc.arduino.cli.commands.LibraryInstallResp.prototype.setProgress = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.LibraryInstallResp} returns this + */ +proto.cc.arduino.cli.commands.LibraryInstallResp.prototype.clearProgress = function() { + return this.setProgress(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.LibraryInstallResp.prototype.hasProgress = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional TaskProgress task_progress = 2; + * @return {?proto.cc.arduino.cli.commands.TaskProgress} + */ +proto.cc.arduino.cli.commands.LibraryInstallResp.prototype.getTaskProgress = function() { + return /** @type{?proto.cc.arduino.cli.commands.TaskProgress} */ ( + jspb.Message.getWrapperField(this, commands_common_pb.TaskProgress, 2)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.TaskProgress|undefined} value + * @return {!proto.cc.arduino.cli.commands.LibraryInstallResp} returns this +*/ +proto.cc.arduino.cli.commands.LibraryInstallResp.prototype.setTaskProgress = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.LibraryInstallResp} returns this + */ +proto.cc.arduino.cli.commands.LibraryInstallResp.prototype.clearTaskProgress = function() { + return this.setTaskProgress(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.LibraryInstallResp.prototype.hasTaskProgress = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.LibraryUninstallReq.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.LibraryUninstallReq.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.LibraryUninstallReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.LibraryUninstallReq.toObject = function(includeInstance, msg) { + var f, obj = { + instance: (f = msg.getInstance()) && commands_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.cc.arduino.cli.commands.LibraryUninstallReq} + */ +proto.cc.arduino.cli.commands.LibraryUninstallReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.LibraryUninstallReq; + return proto.cc.arduino.cli.commands.LibraryUninstallReq.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.LibraryUninstallReq} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.LibraryUninstallReq} + */ +proto.cc.arduino.cli.commands.LibraryUninstallReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new commands_common_pb.Instance; + reader.readMessage(value,commands_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.cc.arduino.cli.commands.LibraryUninstallReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.LibraryUninstallReq} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.LibraryUninstallReq.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInstance(); + if (f != null) { + writer.writeMessage( + 1, + f, + commands_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.cc.arduino.cli.commands.Instance} + */ +proto.cc.arduino.cli.commands.LibraryUninstallReq.prototype.getInstance = function() { + return /** @type{?proto.cc.arduino.cli.commands.Instance} */ ( + jspb.Message.getWrapperField(this, commands_common_pb.Instance, 1)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.Instance|undefined} value + * @return {!proto.cc.arduino.cli.commands.LibraryUninstallReq} returns this +*/ +proto.cc.arduino.cli.commands.LibraryUninstallReq.prototype.setInstance = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.LibraryUninstallReq} returns this + */ +proto.cc.arduino.cli.commands.LibraryUninstallReq.prototype.clearInstance = function() { + return this.setInstance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.LibraryUninstallReq.prototype.hasInstance = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string name = 2; + * @return {string} + */ +proto.cc.arduino.cli.commands.LibraryUninstallReq.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.LibraryUninstallReq} returns this + */ +proto.cc.arduino.cli.commands.LibraryUninstallReq.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string version = 3; + * @return {string} + */ +proto.cc.arduino.cli.commands.LibraryUninstallReq.prototype.getVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.LibraryUninstallReq} returns this + */ +proto.cc.arduino.cli.commands.LibraryUninstallReq.prototype.setVersion = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.LibraryUninstallResp.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.LibraryUninstallResp.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.LibraryUninstallResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.LibraryUninstallResp.toObject = function(includeInstance, msg) { + var f, obj = { + taskProgress: (f = msg.getTaskProgress()) && commands_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.cc.arduino.cli.commands.LibraryUninstallResp} + */ +proto.cc.arduino.cli.commands.LibraryUninstallResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.LibraryUninstallResp; + return proto.cc.arduino.cli.commands.LibraryUninstallResp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.LibraryUninstallResp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.LibraryUninstallResp} + */ +proto.cc.arduino.cli.commands.LibraryUninstallResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new commands_common_pb.TaskProgress; + reader.readMessage(value,commands_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.cc.arduino.cli.commands.LibraryUninstallResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.LibraryUninstallResp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.LibraryUninstallResp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTaskProgress(); + if (f != null) { + writer.writeMessage( + 1, + f, + commands_common_pb.TaskProgress.serializeBinaryToWriter + ); + } +}; + + +/** + * optional TaskProgress task_progress = 1; + * @return {?proto.cc.arduino.cli.commands.TaskProgress} + */ +proto.cc.arduino.cli.commands.LibraryUninstallResp.prototype.getTaskProgress = function() { + return /** @type{?proto.cc.arduino.cli.commands.TaskProgress} */ ( + jspb.Message.getWrapperField(this, commands_common_pb.TaskProgress, 1)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.TaskProgress|undefined} value + * @return {!proto.cc.arduino.cli.commands.LibraryUninstallResp} returns this +*/ +proto.cc.arduino.cli.commands.LibraryUninstallResp.prototype.setTaskProgress = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.LibraryUninstallResp} returns this + */ +proto.cc.arduino.cli.commands.LibraryUninstallResp.prototype.clearTaskProgress = function() { + return this.setTaskProgress(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.LibraryUninstallResp.prototype.hasTaskProgress = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.LibraryUpgradeAllReq.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.LibraryUpgradeAllReq.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.LibraryUpgradeAllReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.LibraryUpgradeAllReq.toObject = function(includeInstance, msg) { + var f, obj = { + instance: (f = msg.getInstance()) && commands_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.cc.arduino.cli.commands.LibraryUpgradeAllReq} + */ +proto.cc.arduino.cli.commands.LibraryUpgradeAllReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.LibraryUpgradeAllReq; + return proto.cc.arduino.cli.commands.LibraryUpgradeAllReq.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.LibraryUpgradeAllReq} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.LibraryUpgradeAllReq} + */ +proto.cc.arduino.cli.commands.LibraryUpgradeAllReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new commands_common_pb.Instance; + reader.readMessage(value,commands_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.cc.arduino.cli.commands.LibraryUpgradeAllReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.LibraryUpgradeAllReq} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.LibraryUpgradeAllReq.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInstance(); + if (f != null) { + writer.writeMessage( + 1, + f, + commands_common_pb.Instance.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Instance instance = 1; + * @return {?proto.cc.arduino.cli.commands.Instance} + */ +proto.cc.arduino.cli.commands.LibraryUpgradeAllReq.prototype.getInstance = function() { + return /** @type{?proto.cc.arduino.cli.commands.Instance} */ ( + jspb.Message.getWrapperField(this, commands_common_pb.Instance, 1)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.Instance|undefined} value + * @return {!proto.cc.arduino.cli.commands.LibraryUpgradeAllReq} returns this +*/ +proto.cc.arduino.cli.commands.LibraryUpgradeAllReq.prototype.setInstance = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.LibraryUpgradeAllReq} returns this + */ +proto.cc.arduino.cli.commands.LibraryUpgradeAllReq.prototype.clearInstance = function() { + return this.setInstance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.LibraryUpgradeAllReq.prototype.hasInstance = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.LibraryUpgradeAllResp.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.LibraryUpgradeAllResp.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.LibraryUpgradeAllResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.LibraryUpgradeAllResp.toObject = function(includeInstance, msg) { + var f, obj = { + progress: (f = msg.getProgress()) && commands_common_pb.DownloadProgress.toObject(includeInstance, f), + taskProgress: (f = msg.getTaskProgress()) && commands_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.cc.arduino.cli.commands.LibraryUpgradeAllResp} + */ +proto.cc.arduino.cli.commands.LibraryUpgradeAllResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.LibraryUpgradeAllResp; + return proto.cc.arduino.cli.commands.LibraryUpgradeAllResp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.LibraryUpgradeAllResp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.LibraryUpgradeAllResp} + */ +proto.cc.arduino.cli.commands.LibraryUpgradeAllResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new commands_common_pb.DownloadProgress; + reader.readMessage(value,commands_common_pb.DownloadProgress.deserializeBinaryFromReader); + msg.setProgress(value); + break; + case 2: + var value = new commands_common_pb.TaskProgress; + reader.readMessage(value,commands_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.cc.arduino.cli.commands.LibraryUpgradeAllResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.LibraryUpgradeAllResp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.LibraryUpgradeAllResp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProgress(); + if (f != null) { + writer.writeMessage( + 1, + f, + commands_common_pb.DownloadProgress.serializeBinaryToWriter + ); + } + f = message.getTaskProgress(); + if (f != null) { + writer.writeMessage( + 2, + f, + commands_common_pb.TaskProgress.serializeBinaryToWriter + ); + } +}; + + +/** + * optional DownloadProgress progress = 1; + * @return {?proto.cc.arduino.cli.commands.DownloadProgress} + */ +proto.cc.arduino.cli.commands.LibraryUpgradeAllResp.prototype.getProgress = function() { + return /** @type{?proto.cc.arduino.cli.commands.DownloadProgress} */ ( + jspb.Message.getWrapperField(this, commands_common_pb.DownloadProgress, 1)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.DownloadProgress|undefined} value + * @return {!proto.cc.arduino.cli.commands.LibraryUpgradeAllResp} returns this +*/ +proto.cc.arduino.cli.commands.LibraryUpgradeAllResp.prototype.setProgress = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.LibraryUpgradeAllResp} returns this + */ +proto.cc.arduino.cli.commands.LibraryUpgradeAllResp.prototype.clearProgress = function() { + return this.setProgress(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.LibraryUpgradeAllResp.prototype.hasProgress = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional TaskProgress task_progress = 2; + * @return {?proto.cc.arduino.cli.commands.TaskProgress} + */ +proto.cc.arduino.cli.commands.LibraryUpgradeAllResp.prototype.getTaskProgress = function() { + return /** @type{?proto.cc.arduino.cli.commands.TaskProgress} */ ( + jspb.Message.getWrapperField(this, commands_common_pb.TaskProgress, 2)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.TaskProgress|undefined} value + * @return {!proto.cc.arduino.cli.commands.LibraryUpgradeAllResp} returns this +*/ +proto.cc.arduino.cli.commands.LibraryUpgradeAllResp.prototype.setTaskProgress = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.LibraryUpgradeAllResp} returns this + */ +proto.cc.arduino.cli.commands.LibraryUpgradeAllResp.prototype.clearTaskProgress = function() { + return this.setTaskProgress(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.LibraryUpgradeAllResp.prototype.hasTaskProgress = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.LibraryResolveDependenciesReq.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.LibraryResolveDependenciesReq.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.LibraryResolveDependenciesReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.LibraryResolveDependenciesReq.toObject = function(includeInstance, msg) { + var f, obj = { + instance: (f = msg.getInstance()) && commands_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.cc.arduino.cli.commands.LibraryResolveDependenciesReq} + */ +proto.cc.arduino.cli.commands.LibraryResolveDependenciesReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.LibraryResolveDependenciesReq; + return proto.cc.arduino.cli.commands.LibraryResolveDependenciesReq.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.LibraryResolveDependenciesReq} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.LibraryResolveDependenciesReq} + */ +proto.cc.arduino.cli.commands.LibraryResolveDependenciesReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new commands_common_pb.Instance; + reader.readMessage(value,commands_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.cc.arduino.cli.commands.LibraryResolveDependenciesReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.LibraryResolveDependenciesReq.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cc.arduino.cli.commands.LibraryResolveDependenciesReq} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.LibraryResolveDependenciesReq.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInstance(); + if (f != null) { + writer.writeMessage( + 1, + f, + commands_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.cc.arduino.cli.commands.Instance} + */ +proto.cc.arduino.cli.commands.LibraryResolveDependenciesReq.prototype.getInstance = function() { + return /** @type{?proto.cc.arduino.cli.commands.Instance} */ ( + jspb.Message.getWrapperField(this, commands_common_pb.Instance, 1)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.Instance|undefined} value + * @return {!proto.cc.arduino.cli.commands.LibraryResolveDependenciesReq} returns this +*/ +proto.cc.arduino.cli.commands.LibraryResolveDependenciesReq.prototype.setInstance = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.LibraryResolveDependenciesReq} returns this + */ +proto.cc.arduino.cli.commands.LibraryResolveDependenciesReq.prototype.clearInstance = function() { + return this.setInstance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.LibraryResolveDependenciesReq.prototype.hasInstance = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string name = 2; + * @return {string} + */ +proto.cc.arduino.cli.commands.LibraryResolveDependenciesReq.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.LibraryResolveDependenciesReq} returns this + */ +proto.cc.arduino.cli.commands.LibraryResolveDependenciesReq.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string version = 3; + * @return {string} + */ +proto.cc.arduino.cli.commands.LibraryResolveDependenciesReq.prototype.getVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.LibraryResolveDependenciesReq} returns this + */ +proto.cc.arduino.cli.commands.LibraryResolveDependenciesReq.prototype.setVersion = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cc.arduino.cli.commands.LibraryResolveDependenciesResp.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.LibraryResolveDependenciesResp.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.LibraryResolveDependenciesResp.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.LibraryResolveDependenciesResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.LibraryResolveDependenciesResp.toObject = function(includeInstance, msg) { + var f, obj = { + dependenciesList: jspb.Message.toObjectList(msg.getDependenciesList(), + proto.cc.arduino.cli.commands.LibraryDependencyStatus.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.cc.arduino.cli.commands.LibraryResolveDependenciesResp} + */ +proto.cc.arduino.cli.commands.LibraryResolveDependenciesResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.LibraryResolveDependenciesResp; + return proto.cc.arduino.cli.commands.LibraryResolveDependenciesResp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.LibraryResolveDependenciesResp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.LibraryResolveDependenciesResp} + */ +proto.cc.arduino.cli.commands.LibraryResolveDependenciesResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cc.arduino.cli.commands.LibraryDependencyStatus; + reader.readMessage(value,proto.cc.arduino.cli.commands.LibraryDependencyStatus.deserializeBinaryFromReader); + msg.addDependencies(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.commands.LibraryResolveDependenciesResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.LibraryResolveDependenciesResp.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cc.arduino.cli.commands.LibraryResolveDependenciesResp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.LibraryResolveDependenciesResp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDependenciesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.cc.arduino.cli.commands.LibraryDependencyStatus.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated LibraryDependencyStatus dependencies = 1; + * @return {!Array} + */ +proto.cc.arduino.cli.commands.LibraryResolveDependenciesResp.prototype.getDependenciesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cc.arduino.cli.commands.LibraryDependencyStatus, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cc.arduino.cli.commands.LibraryResolveDependenciesResp} returns this +*/ +proto.cc.arduino.cli.commands.LibraryResolveDependenciesResp.prototype.setDependenciesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cc.arduino.cli.commands.LibraryDependencyStatus=} opt_value + * @param {number=} opt_index + * @return {!proto.cc.arduino.cli.commands.LibraryDependencyStatus} + */ +proto.cc.arduino.cli.commands.LibraryResolveDependenciesResp.prototype.addDependencies = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cc.arduino.cli.commands.LibraryDependencyStatus, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cc.arduino.cli.commands.LibraryResolveDependenciesResp} returns this + */ +proto.cc.arduino.cli.commands.LibraryResolveDependenciesResp.prototype.clearDependenciesList = function() { + return this.setDependenciesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.LibraryDependencyStatus.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.LibraryDependencyStatus.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.LibraryDependencyStatus} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.LibraryDependencyStatus.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + versionrequired: jspb.Message.getFieldWithDefault(msg, 2, ""), + versioninstalled: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cc.arduino.cli.commands.LibraryDependencyStatus} + */ +proto.cc.arduino.cli.commands.LibraryDependencyStatus.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.LibraryDependencyStatus; + return proto.cc.arduino.cli.commands.LibraryDependencyStatus.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.LibraryDependencyStatus} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.LibraryDependencyStatus} + */ +proto.cc.arduino.cli.commands.LibraryDependencyStatus.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.setVersionrequired(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setVersioninstalled(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.commands.LibraryDependencyStatus.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.LibraryDependencyStatus.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cc.arduino.cli.commands.LibraryDependencyStatus} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.LibraryDependencyStatus.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getVersionrequired(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getVersioninstalled(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.cc.arduino.cli.commands.LibraryDependencyStatus.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.LibraryDependencyStatus} returns this + */ +proto.cc.arduino.cli.commands.LibraryDependencyStatus.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string versionRequired = 2; + * @return {string} + */ +proto.cc.arduino.cli.commands.LibraryDependencyStatus.prototype.getVersionrequired = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.LibraryDependencyStatus} returns this + */ +proto.cc.arduino.cli.commands.LibraryDependencyStatus.prototype.setVersionrequired = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string versionInstalled = 3; + * @return {string} + */ +proto.cc.arduino.cli.commands.LibraryDependencyStatus.prototype.getVersioninstalled = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.LibraryDependencyStatus} returns this + */ +proto.cc.arduino.cli.commands.LibraryDependencyStatus.prototype.setVersioninstalled = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.LibrarySearchReq.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.LibrarySearchReq.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.LibrarySearchReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.LibrarySearchReq.toObject = function(includeInstance, msg) { + var f, obj = { + instance: (f = msg.getInstance()) && commands_common_pb.Instance.toObject(includeInstance, f), + query: 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.cc.arduino.cli.commands.LibrarySearchReq} + */ +proto.cc.arduino.cli.commands.LibrarySearchReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.LibrarySearchReq; + return proto.cc.arduino.cli.commands.LibrarySearchReq.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.LibrarySearchReq} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.LibrarySearchReq} + */ +proto.cc.arduino.cli.commands.LibrarySearchReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new commands_common_pb.Instance; + reader.readMessage(value,commands_common_pb.Instance.deserializeBinaryFromReader); + msg.setInstance(value); + break; + case 2: + 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.cc.arduino.cli.commands.LibrarySearchReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.LibrarySearchReq} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.LibrarySearchReq.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInstance(); + if (f != null) { + writer.writeMessage( + 1, + f, + commands_common_pb.Instance.serializeBinaryToWriter + ); + } + f = message.getQuery(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional Instance instance = 1; + * @return {?proto.cc.arduino.cli.commands.Instance} + */ +proto.cc.arduino.cli.commands.LibrarySearchReq.prototype.getInstance = function() { + return /** @type{?proto.cc.arduino.cli.commands.Instance} */ ( + jspb.Message.getWrapperField(this, commands_common_pb.Instance, 1)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.Instance|undefined} value + * @return {!proto.cc.arduino.cli.commands.LibrarySearchReq} returns this +*/ +proto.cc.arduino.cli.commands.LibrarySearchReq.prototype.setInstance = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.LibrarySearchReq} returns this + */ +proto.cc.arduino.cli.commands.LibrarySearchReq.prototype.clearInstance = function() { + return this.setInstance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.LibrarySearchReq.prototype.hasInstance = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string query = 2; + * @return {string} + */ +proto.cc.arduino.cli.commands.LibrarySearchReq.prototype.getQuery = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.LibrarySearchReq} returns this + */ +proto.cc.arduino.cli.commands.LibrarySearchReq.prototype.setQuery = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cc.arduino.cli.commands.LibrarySearchResp.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.LibrarySearchResp.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.LibrarySearchResp.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.LibrarySearchResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.LibrarySearchResp.toObject = function(includeInstance, msg) { + var f, obj = { + librariesList: jspb.Message.toObjectList(msg.getLibrariesList(), + proto.cc.arduino.cli.commands.SearchedLibrary.toObject, includeInstance), + status: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cc.arduino.cli.commands.LibrarySearchResp} + */ +proto.cc.arduino.cli.commands.LibrarySearchResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.LibrarySearchResp; + return proto.cc.arduino.cli.commands.LibrarySearchResp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.LibrarySearchResp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.LibrarySearchResp} + */ +proto.cc.arduino.cli.commands.LibrarySearchResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cc.arduino.cli.commands.SearchedLibrary; + reader.readMessage(value,proto.cc.arduino.cli.commands.SearchedLibrary.deserializeBinaryFromReader); + msg.addLibraries(value); + break; + case 2: + var value = /** @type {!proto.cc.arduino.cli.commands.LibrarySearchStatus} */ (reader.readEnum()); + msg.setStatus(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.commands.LibrarySearchResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.LibrarySearchResp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.LibrarySearchResp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLibrariesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.cc.arduino.cli.commands.SearchedLibrary.serializeBinaryToWriter + ); + } + f = message.getStatus(); + if (f !== 0.0) { + writer.writeEnum( + 2, + f + ); + } +}; + + +/** + * repeated SearchedLibrary libraries = 1; + * @return {!Array} + */ +proto.cc.arduino.cli.commands.LibrarySearchResp.prototype.getLibrariesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cc.arduino.cli.commands.SearchedLibrary, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cc.arduino.cli.commands.LibrarySearchResp} returns this +*/ +proto.cc.arduino.cli.commands.LibrarySearchResp.prototype.setLibrariesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cc.arduino.cli.commands.SearchedLibrary=} opt_value + * @param {number=} opt_index + * @return {!proto.cc.arduino.cli.commands.SearchedLibrary} + */ +proto.cc.arduino.cli.commands.LibrarySearchResp.prototype.addLibraries = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cc.arduino.cli.commands.SearchedLibrary, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cc.arduino.cli.commands.LibrarySearchResp} returns this + */ +proto.cc.arduino.cli.commands.LibrarySearchResp.prototype.clearLibrariesList = function() { + return this.setLibrariesList([]); +}; + + +/** + * optional LibrarySearchStatus status = 2; + * @return {!proto.cc.arduino.cli.commands.LibrarySearchStatus} + */ +proto.cc.arduino.cli.commands.LibrarySearchResp.prototype.getStatus = function() { + return /** @type {!proto.cc.arduino.cli.commands.LibrarySearchStatus} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {!proto.cc.arduino.cli.commands.LibrarySearchStatus} value + * @return {!proto.cc.arduino.cli.commands.LibrarySearchResp} returns this + */ +proto.cc.arduino.cli.commands.LibrarySearchResp.prototype.setStatus = function(value) { + return jspb.Message.setProto3EnumField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.SearchedLibrary.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.SearchedLibrary.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.SearchedLibrary} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.SearchedLibrary.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + releasesMap: (f = msg.getReleasesMap()) ? f.toObject(includeInstance, proto.cc.arduino.cli.commands.LibraryRelease.toObject) : [], + latest: (f = msg.getLatest()) && proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.SearchedLibrary} + */ +proto.cc.arduino.cli.commands.SearchedLibrary.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.SearchedLibrary; + return proto.cc.arduino.cli.commands.SearchedLibrary.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.SearchedLibrary} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.SearchedLibrary} + */ +proto.cc.arduino.cli.commands.SearchedLibrary.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.cc.arduino.cli.commands.LibraryRelease.deserializeBinaryFromReader, "", new proto.cc.arduino.cli.commands.LibraryRelease()); + }); + break; + case 3: + var value = new proto.cc.arduino.cli.commands.LibraryRelease; + reader.readMessage(value,proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.SearchedLibrary.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.SearchedLibrary.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cc.arduino.cli.commands.SearchedLibrary} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.SearchedLibrary.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.cc.arduino.cli.commands.LibraryRelease.serializeBinaryToWriter); + } + f = message.getLatest(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.cc.arduino.cli.commands.LibraryRelease.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.cc.arduino.cli.commands.SearchedLibrary.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.SearchedLibrary} returns this + */ +proto.cc.arduino.cli.commands.SearchedLibrary.prototype.setName = function(value) { + return 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.cc.arduino.cli.commands.SearchedLibrary.prototype.getReleasesMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 2, opt_noLazyCreate, + proto.cc.arduino.cli.commands.LibraryRelease)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.cc.arduino.cli.commands.SearchedLibrary} returns this + */ +proto.cc.arduino.cli.commands.SearchedLibrary.prototype.clearReleasesMap = function() { + this.getReleasesMap().clear(); + return this;}; + + +/** + * optional LibraryRelease latest = 3; + * @return {?proto.cc.arduino.cli.commands.LibraryRelease} + */ +proto.cc.arduino.cli.commands.SearchedLibrary.prototype.getLatest = function() { + return /** @type{?proto.cc.arduino.cli.commands.LibraryRelease} */ ( + jspb.Message.getWrapperField(this, proto.cc.arduino.cli.commands.LibraryRelease, 3)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.LibraryRelease|undefined} value + * @return {!proto.cc.arduino.cli.commands.SearchedLibrary} returns this +*/ +proto.cc.arduino.cli.commands.SearchedLibrary.prototype.setLatest = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.SearchedLibrary} returns this + */ +proto.cc.arduino.cli.commands.SearchedLibrary.prototype.clearLatest = function() { + return this.setLatest(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.SearchedLibrary.prototype.hasLatest = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cc.arduino.cli.commands.LibraryRelease.repeatedFields_ = [8,9,12,13]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.LibraryRelease.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.LibraryRelease.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.LibraryRelease} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.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: (f = jspb.Message.getRepeatedField(msg, 8)) == null ? undefined : f, + typesList: (f = jspb.Message.getRepeatedField(msg, 9)) == null ? undefined : f, + resources: (f = msg.getResources()) && proto.cc.arduino.cli.commands.DownloadResource.toObject(includeInstance, f), + license: jspb.Message.getFieldWithDefault(msg, 11, ""), + providesIncludesList: (f = jspb.Message.getRepeatedField(msg, 12)) == null ? undefined : f, + dependenciesList: jspb.Message.toObjectList(msg.getDependenciesList(), + proto.cc.arduino.cli.commands.LibraryDependency.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.cc.arduino.cli.commands.LibraryRelease} + */ +proto.cc.arduino.cli.commands.LibraryRelease.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.LibraryRelease; + return proto.cc.arduino.cli.commands.LibraryRelease.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.LibraryRelease} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.LibraryRelease} + */ +proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.DownloadResource; + reader.readMessage(value,proto.cc.arduino.cli.commands.DownloadResource.deserializeBinaryFromReader); + msg.setResources(value); + break; + case 11: + var value = /** @type {string} */ (reader.readString()); + msg.setLicense(value); + break; + case 12: + var value = /** @type {string} */ (reader.readString()); + msg.addProvidesIncludes(value); + break; + case 13: + var value = new proto.cc.arduino.cli.commands.LibraryDependency; + reader.readMessage(value,proto.cc.arduino.cli.commands.LibraryDependency.deserializeBinaryFromReader); + msg.addDependencies(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.commands.LibraryRelease.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.LibraryRelease} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.DownloadResource.serializeBinaryToWriter + ); + } + f = message.getLicense(); + if (f.length > 0) { + writer.writeString( + 11, + f + ); + } + f = message.getProvidesIncludesList(); + if (f.length > 0) { + writer.writeRepeatedString( + 12, + f + ); + } + f = message.getDependenciesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 13, + f, + proto.cc.arduino.cli.commands.LibraryDependency.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string author = 1; + * @return {string} + */ +proto.cc.arduino.cli.commands.LibraryRelease.prototype.getAuthor = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.LibraryRelease} returns this + */ +proto.cc.arduino.cli.commands.LibraryRelease.prototype.setAuthor = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string version = 2; + * @return {string} + */ +proto.cc.arduino.cli.commands.LibraryRelease.prototype.getVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.LibraryRelease} returns this + */ +proto.cc.arduino.cli.commands.LibraryRelease.prototype.setVersion = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string maintainer = 3; + * @return {string} + */ +proto.cc.arduino.cli.commands.LibraryRelease.prototype.getMaintainer = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.LibraryRelease} returns this + */ +proto.cc.arduino.cli.commands.LibraryRelease.prototype.setMaintainer = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string sentence = 4; + * @return {string} + */ +proto.cc.arduino.cli.commands.LibraryRelease.prototype.getSentence = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.LibraryRelease} returns this + */ +proto.cc.arduino.cli.commands.LibraryRelease.prototype.setSentence = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string paragraph = 5; + * @return {string} + */ +proto.cc.arduino.cli.commands.LibraryRelease.prototype.getParagraph = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.LibraryRelease} returns this + */ +proto.cc.arduino.cli.commands.LibraryRelease.prototype.setParagraph = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional string website = 6; + * @return {string} + */ +proto.cc.arduino.cli.commands.LibraryRelease.prototype.getWebsite = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.LibraryRelease} returns this + */ +proto.cc.arduino.cli.commands.LibraryRelease.prototype.setWebsite = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional string category = 7; + * @return {string} + */ +proto.cc.arduino.cli.commands.LibraryRelease.prototype.getCategory = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.LibraryRelease} returns this + */ +proto.cc.arduino.cli.commands.LibraryRelease.prototype.setCategory = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + +/** + * repeated string architectures = 8; + * @return {!Array} + */ +proto.cc.arduino.cli.commands.LibraryRelease.prototype.getArchitecturesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 8)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cc.arduino.cli.commands.LibraryRelease} returns this + */ +proto.cc.arduino.cli.commands.LibraryRelease.prototype.setArchitecturesList = function(value) { + return jspb.Message.setField(this, 8, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.cc.arduino.cli.commands.LibraryRelease} returns this + */ +proto.cc.arduino.cli.commands.LibraryRelease.prototype.addArchitectures = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 8, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cc.arduino.cli.commands.LibraryRelease} returns this + */ +proto.cc.arduino.cli.commands.LibraryRelease.prototype.clearArchitecturesList = function() { + return this.setArchitecturesList([]); +}; + + +/** + * repeated string types = 9; + * @return {!Array} + */ +proto.cc.arduino.cli.commands.LibraryRelease.prototype.getTypesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 9)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cc.arduino.cli.commands.LibraryRelease} returns this + */ +proto.cc.arduino.cli.commands.LibraryRelease.prototype.setTypesList = function(value) { + return jspb.Message.setField(this, 9, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.cc.arduino.cli.commands.LibraryRelease} returns this + */ +proto.cc.arduino.cli.commands.LibraryRelease.prototype.addTypes = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 9, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cc.arduino.cli.commands.LibraryRelease} returns this + */ +proto.cc.arduino.cli.commands.LibraryRelease.prototype.clearTypesList = function() { + return this.setTypesList([]); +}; + + +/** + * optional DownloadResource resources = 10; + * @return {?proto.cc.arduino.cli.commands.DownloadResource} + */ +proto.cc.arduino.cli.commands.LibraryRelease.prototype.getResources = function() { + return /** @type{?proto.cc.arduino.cli.commands.DownloadResource} */ ( + jspb.Message.getWrapperField(this, proto.cc.arduino.cli.commands.DownloadResource, 10)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.DownloadResource|undefined} value + * @return {!proto.cc.arduino.cli.commands.LibraryRelease} returns this +*/ +proto.cc.arduino.cli.commands.LibraryRelease.prototype.setResources = function(value) { + return jspb.Message.setWrapperField(this, 10, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.LibraryRelease} returns this + */ +proto.cc.arduino.cli.commands.LibraryRelease.prototype.clearResources = function() { + return this.setResources(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.LibraryRelease.prototype.hasResources = function() { + return jspb.Message.getField(this, 10) != null; +}; + + +/** + * optional string license = 11; + * @return {string} + */ +proto.cc.arduino.cli.commands.LibraryRelease.prototype.getLicense = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.LibraryRelease} returns this + */ +proto.cc.arduino.cli.commands.LibraryRelease.prototype.setLicense = function(value) { + return jspb.Message.setProto3StringField(this, 11, value); +}; + + +/** + * repeated string provides_includes = 12; + * @return {!Array} + */ +proto.cc.arduino.cli.commands.LibraryRelease.prototype.getProvidesIncludesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 12)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cc.arduino.cli.commands.LibraryRelease} returns this + */ +proto.cc.arduino.cli.commands.LibraryRelease.prototype.setProvidesIncludesList = function(value) { + return jspb.Message.setField(this, 12, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.cc.arduino.cli.commands.LibraryRelease} returns this + */ +proto.cc.arduino.cli.commands.LibraryRelease.prototype.addProvidesIncludes = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 12, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cc.arduino.cli.commands.LibraryRelease} returns this + */ +proto.cc.arduino.cli.commands.LibraryRelease.prototype.clearProvidesIncludesList = function() { + return this.setProvidesIncludesList([]); +}; + + +/** + * repeated LibraryDependency dependencies = 13; + * @return {!Array} + */ +proto.cc.arduino.cli.commands.LibraryRelease.prototype.getDependenciesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cc.arduino.cli.commands.LibraryDependency, 13)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cc.arduino.cli.commands.LibraryRelease} returns this +*/ +proto.cc.arduino.cli.commands.LibraryRelease.prototype.setDependenciesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 13, value); +}; + + +/** + * @param {!proto.cc.arduino.cli.commands.LibraryDependency=} opt_value + * @param {number=} opt_index + * @return {!proto.cc.arduino.cli.commands.LibraryDependency} + */ +proto.cc.arduino.cli.commands.LibraryRelease.prototype.addDependencies = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 13, opt_value, proto.cc.arduino.cli.commands.LibraryDependency, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cc.arduino.cli.commands.LibraryRelease} returns this + */ +proto.cc.arduino.cli.commands.LibraryRelease.prototype.clearDependenciesList = function() { + return this.setDependenciesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.LibraryDependency.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.LibraryDependency.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.LibraryDependency} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.LibraryDependency.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + versionConstraint: 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.cc.arduino.cli.commands.LibraryDependency} + */ +proto.cc.arduino.cli.commands.LibraryDependency.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.LibraryDependency; + return proto.cc.arduino.cli.commands.LibraryDependency.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.LibraryDependency} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.LibraryDependency} + */ +proto.cc.arduino.cli.commands.LibraryDependency.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.setVersionConstraint(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.commands.LibraryDependency.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.LibraryDependency.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cc.arduino.cli.commands.LibraryDependency} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.LibraryDependency.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getVersionConstraint(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.cc.arduino.cli.commands.LibraryDependency.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.LibraryDependency} returns this + */ +proto.cc.arduino.cli.commands.LibraryDependency.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string version_constraint = 2; + * @return {string} + */ +proto.cc.arduino.cli.commands.LibraryDependency.prototype.getVersionConstraint = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.LibraryDependency} returns this + */ +proto.cc.arduino.cli.commands.LibraryDependency.prototype.setVersionConstraint = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.DownloadResource.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.DownloadResource.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.DownloadResource} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.DownloadResource} + */ +proto.cc.arduino.cli.commands.DownloadResource.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.DownloadResource; + return proto.cc.arduino.cli.commands.DownloadResource.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.DownloadResource} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.DownloadResource} + */ +proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.DownloadResource.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.DownloadResource} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.DownloadResource.prototype.getUrl = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.DownloadResource} returns this + */ +proto.cc.arduino.cli.commands.DownloadResource.prototype.setUrl = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string archivefilename = 2; + * @return {string} + */ +proto.cc.arduino.cli.commands.DownloadResource.prototype.getArchivefilename = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.DownloadResource} returns this + */ +proto.cc.arduino.cli.commands.DownloadResource.prototype.setArchivefilename = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string checksum = 3; + * @return {string} + */ +proto.cc.arduino.cli.commands.DownloadResource.prototype.getChecksum = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.DownloadResource} returns this + */ +proto.cc.arduino.cli.commands.DownloadResource.prototype.setChecksum = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional int64 size = 4; + * @return {number} + */ +proto.cc.arduino.cli.commands.DownloadResource.prototype.getSize = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cc.arduino.cli.commands.DownloadResource} returns this + */ +proto.cc.arduino.cli.commands.DownloadResource.prototype.setSize = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional string cachepath = 5; + * @return {string} + */ +proto.cc.arduino.cli.commands.DownloadResource.prototype.getCachepath = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.DownloadResource} returns this + */ +proto.cc.arduino.cli.commands.DownloadResource.prototype.setCachepath = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.LibraryListReq.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.LibraryListReq.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.LibraryListReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.LibraryListReq.toObject = function(includeInstance, msg) { + var f, obj = { + instance: (f = msg.getInstance()) && commands_common_pb.Instance.toObject(includeInstance, f), + all: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + updatable: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cc.arduino.cli.commands.LibraryListReq} + */ +proto.cc.arduino.cli.commands.LibraryListReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.LibraryListReq; + return proto.cc.arduino.cli.commands.LibraryListReq.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.LibraryListReq} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.LibraryListReq} + */ +proto.cc.arduino.cli.commands.LibraryListReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new commands_common_pb.Instance; + reader.readMessage(value,commands_common_pb.Instance.deserializeBinaryFromReader); + msg.setInstance(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setAll(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setUpdatable(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.commands.LibraryListReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.LibraryListReq.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cc.arduino.cli.commands.LibraryListReq} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.LibraryListReq.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInstance(); + if (f != null) { + writer.writeMessage( + 1, + f, + commands_common_pb.Instance.serializeBinaryToWriter + ); + } + f = message.getAll(); + if (f) { + writer.writeBool( + 2, + f + ); + } + f = message.getUpdatable(); + if (f) { + writer.writeBool( + 3, + f + ); + } +}; + + +/** + * optional Instance instance = 1; + * @return {?proto.cc.arduino.cli.commands.Instance} + */ +proto.cc.arduino.cli.commands.LibraryListReq.prototype.getInstance = function() { + return /** @type{?proto.cc.arduino.cli.commands.Instance} */ ( + jspb.Message.getWrapperField(this, commands_common_pb.Instance, 1)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.Instance|undefined} value + * @return {!proto.cc.arduino.cli.commands.LibraryListReq} returns this +*/ +proto.cc.arduino.cli.commands.LibraryListReq.prototype.setInstance = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.LibraryListReq} returns this + */ +proto.cc.arduino.cli.commands.LibraryListReq.prototype.clearInstance = function() { + return this.setInstance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.LibraryListReq.prototype.hasInstance = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bool all = 2; + * @return {boolean} + */ +proto.cc.arduino.cli.commands.LibraryListReq.prototype.getAll = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cc.arduino.cli.commands.LibraryListReq} returns this + */ +proto.cc.arduino.cli.commands.LibraryListReq.prototype.setAll = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * optional bool updatable = 3; + * @return {boolean} + */ +proto.cc.arduino.cli.commands.LibraryListReq.prototype.getUpdatable = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cc.arduino.cli.commands.LibraryListReq} returns this + */ +proto.cc.arduino.cli.commands.LibraryListReq.prototype.setUpdatable = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cc.arduino.cli.commands.LibraryListResp.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.LibraryListResp.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.LibraryListResp.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.LibraryListResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.LibraryListResp.toObject = function(includeInstance, msg) { + var f, obj = { + installedLibraryList: jspb.Message.toObjectList(msg.getInstalledLibraryList(), + proto.cc.arduino.cli.commands.InstalledLibrary.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.cc.arduino.cli.commands.LibraryListResp} + */ +proto.cc.arduino.cli.commands.LibraryListResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.LibraryListResp; + return proto.cc.arduino.cli.commands.LibraryListResp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.LibraryListResp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.LibraryListResp} + */ +proto.cc.arduino.cli.commands.LibraryListResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cc.arduino.cli.commands.InstalledLibrary; + reader.readMessage(value,proto.cc.arduino.cli.commands.InstalledLibrary.deserializeBinaryFromReader); + msg.addInstalledLibrary(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.commands.LibraryListResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.LibraryListResp.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cc.arduino.cli.commands.LibraryListResp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.LibraryListResp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInstalledLibraryList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.cc.arduino.cli.commands.InstalledLibrary.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated InstalledLibrary installed_library = 1; + * @return {!Array} + */ +proto.cc.arduino.cli.commands.LibraryListResp.prototype.getInstalledLibraryList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cc.arduino.cli.commands.InstalledLibrary, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cc.arduino.cli.commands.LibraryListResp} returns this +*/ +proto.cc.arduino.cli.commands.LibraryListResp.prototype.setInstalledLibraryList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cc.arduino.cli.commands.InstalledLibrary=} opt_value + * @param {number=} opt_index + * @return {!proto.cc.arduino.cli.commands.InstalledLibrary} + */ +proto.cc.arduino.cli.commands.LibraryListResp.prototype.addInstalledLibrary = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cc.arduino.cli.commands.InstalledLibrary, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cc.arduino.cli.commands.LibraryListResp} returns this + */ +proto.cc.arduino.cli.commands.LibraryListResp.prototype.clearInstalledLibraryList = function() { + return this.setInstalledLibraryList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.InstalledLibrary.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.InstalledLibrary.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.InstalledLibrary} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.InstalledLibrary.toObject = function(includeInstance, msg) { + var f, obj = { + library: (f = msg.getLibrary()) && proto.cc.arduino.cli.commands.Library.toObject(includeInstance, f), + release: (f = msg.getRelease()) && proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.InstalledLibrary} + */ +proto.cc.arduino.cli.commands.InstalledLibrary.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.InstalledLibrary; + return proto.cc.arduino.cli.commands.InstalledLibrary.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.InstalledLibrary} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.InstalledLibrary} + */ +proto.cc.arduino.cli.commands.InstalledLibrary.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cc.arduino.cli.commands.Library; + reader.readMessage(value,proto.cc.arduino.cli.commands.Library.deserializeBinaryFromReader); + msg.setLibrary(value); + break; + case 2: + var value = new proto.cc.arduino.cli.commands.LibraryRelease; + reader.readMessage(value,proto.cc.arduino.cli.commands.LibraryRelease.deserializeBinaryFromReader); + msg.setRelease(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.commands.InstalledLibrary.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.InstalledLibrary.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cc.arduino.cli.commands.InstalledLibrary} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.InstalledLibrary.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLibrary(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.cc.arduino.cli.commands.Library.serializeBinaryToWriter + ); + } + f = message.getRelease(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.cc.arduino.cli.commands.LibraryRelease.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Library library = 1; + * @return {?proto.cc.arduino.cli.commands.Library} + */ +proto.cc.arduino.cli.commands.InstalledLibrary.prototype.getLibrary = function() { + return /** @type{?proto.cc.arduino.cli.commands.Library} */ ( + jspb.Message.getWrapperField(this, proto.cc.arduino.cli.commands.Library, 1)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.Library|undefined} value + * @return {!proto.cc.arduino.cli.commands.InstalledLibrary} returns this +*/ +proto.cc.arduino.cli.commands.InstalledLibrary.prototype.setLibrary = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.InstalledLibrary} returns this + */ +proto.cc.arduino.cli.commands.InstalledLibrary.prototype.clearLibrary = function() { + return this.setLibrary(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.InstalledLibrary.prototype.hasLibrary = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional LibraryRelease release = 2; + * @return {?proto.cc.arduino.cli.commands.LibraryRelease} + */ +proto.cc.arduino.cli.commands.InstalledLibrary.prototype.getRelease = function() { + return /** @type{?proto.cc.arduino.cli.commands.LibraryRelease} */ ( + jspb.Message.getWrapperField(this, proto.cc.arduino.cli.commands.LibraryRelease, 2)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.LibraryRelease|undefined} value + * @return {!proto.cc.arduino.cli.commands.InstalledLibrary} returns this +*/ +proto.cc.arduino.cli.commands.InstalledLibrary.prototype.setRelease = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.InstalledLibrary} returns this + */ +proto.cc.arduino.cli.commands.InstalledLibrary.prototype.clearRelease = function() { + return this.setRelease(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.InstalledLibrary.prototype.hasRelease = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cc.arduino.cli.commands.Library.repeatedFields_ = [8,9]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.Library.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.Library.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.Library} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.Library.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + author: 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: (f = jspb.Message.getRepeatedField(msg, 8)) == null ? undefined : f, + typesList: (f = jspb.Message.getRepeatedField(msg, 9)) == null ? undefined : f, + installDir: jspb.Message.getFieldWithDefault(msg, 10, ""), + sourceDir: jspb.Message.getFieldWithDefault(msg, 11, ""), + utilityDir: jspb.Message.getFieldWithDefault(msg, 12, ""), + containerPlatform: jspb.Message.getFieldWithDefault(msg, 14, ""), + realName: jspb.Message.getFieldWithDefault(msg, 16, ""), + dotALinkage: jspb.Message.getBooleanFieldWithDefault(msg, 17, false), + precompiled: jspb.Message.getBooleanFieldWithDefault(msg, 18, false), + ldFlags: jspb.Message.getFieldWithDefault(msg, 19, ""), + isLegacy: jspb.Message.getBooleanFieldWithDefault(msg, 20, false), + version: jspb.Message.getFieldWithDefault(msg, 21, ""), + license: jspb.Message.getFieldWithDefault(msg, 22, ""), + propertiesMap: (f = msg.getPropertiesMap()) ? f.toObject(includeInstance, undefined) : [], + location: jspb.Message.getFieldWithDefault(msg, 24, 0), + layout: jspb.Message.getFieldWithDefault(msg, 25, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cc.arduino.cli.commands.Library} + */ +proto.cc.arduino.cli.commands.Library.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.Library; + return proto.cc.arduino.cli.commands.Library.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.Library} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.Library} + */ +proto.cc.arduino.cli.commands.Library.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.setAuthor(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 = /** @type {string} */ (reader.readString()); + msg.setInstallDir(value); + break; + case 11: + var value = /** @type {string} */ (reader.readString()); + msg.setSourceDir(value); + break; + case 12: + var value = /** @type {string} */ (reader.readString()); + msg.setUtilityDir(value); + break; + case 14: + var value = /** @type {string} */ (reader.readString()); + msg.setContainerPlatform(value); + break; + case 16: + var value = /** @type {string} */ (reader.readString()); + msg.setRealName(value); + break; + case 17: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setDotALinkage(value); + break; + case 18: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setPrecompiled(value); + break; + case 19: + var value = /** @type {string} */ (reader.readString()); + msg.setLdFlags(value); + break; + case 20: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsLegacy(value); + break; + case 21: + var value = /** @type {string} */ (reader.readString()); + msg.setVersion(value); + break; + case 22: + var value = /** @type {string} */ (reader.readString()); + msg.setLicense(value); + break; + case 23: + var value = msg.getPropertiesMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + case 24: + var value = /** @type {!proto.cc.arduino.cli.commands.LibraryLocation} */ (reader.readEnum()); + msg.setLocation(value); + break; + case 25: + var value = /** @type {!proto.cc.arduino.cli.commands.LibraryLayout} */ (reader.readEnum()); + msg.setLayout(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.commands.Library.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.Library.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cc.arduino.cli.commands.Library} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.Library.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAuthor(); + 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.getInstallDir(); + if (f.length > 0) { + writer.writeString( + 10, + f + ); + } + f = message.getSourceDir(); + if (f.length > 0) { + writer.writeString( + 11, + f + ); + } + f = message.getUtilityDir(); + if (f.length > 0) { + writer.writeString( + 12, + f + ); + } + f = message.getContainerPlatform(); + if (f.length > 0) { + writer.writeString( + 14, + f + ); + } + f = message.getRealName(); + if (f.length > 0) { + writer.writeString( + 16, + f + ); + } + f = message.getDotALinkage(); + if (f) { + writer.writeBool( + 17, + f + ); + } + f = message.getPrecompiled(); + if (f) { + writer.writeBool( + 18, + f + ); + } + f = message.getLdFlags(); + if (f.length > 0) { + writer.writeString( + 19, + f + ); + } + f = message.getIsLegacy(); + if (f) { + writer.writeBool( + 20, + f + ); + } + f = message.getVersion(); + if (f.length > 0) { + writer.writeString( + 21, + f + ); + } + f = message.getLicense(); + if (f.length > 0) { + writer.writeString( + 22, + f + ); + } + f = message.getPropertiesMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(23, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } + f = message.getLocation(); + if (f !== 0.0) { + writer.writeEnum( + 24, + f + ); + } + f = message.getLayout(); + if (f !== 0.0) { + writer.writeEnum( + 25, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.cc.arduino.cli.commands.Library.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.Library} returns this + */ +proto.cc.arduino.cli.commands.Library.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string author = 2; + * @return {string} + */ +proto.cc.arduino.cli.commands.Library.prototype.getAuthor = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.Library} returns this + */ +proto.cc.arduino.cli.commands.Library.prototype.setAuthor = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string maintainer = 3; + * @return {string} + */ +proto.cc.arduino.cli.commands.Library.prototype.getMaintainer = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.Library} returns this + */ +proto.cc.arduino.cli.commands.Library.prototype.setMaintainer = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string sentence = 4; + * @return {string} + */ +proto.cc.arduino.cli.commands.Library.prototype.getSentence = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.Library} returns this + */ +proto.cc.arduino.cli.commands.Library.prototype.setSentence = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string paragraph = 5; + * @return {string} + */ +proto.cc.arduino.cli.commands.Library.prototype.getParagraph = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.Library} returns this + */ +proto.cc.arduino.cli.commands.Library.prototype.setParagraph = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional string website = 6; + * @return {string} + */ +proto.cc.arduino.cli.commands.Library.prototype.getWebsite = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.Library} returns this + */ +proto.cc.arduino.cli.commands.Library.prototype.setWebsite = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional string category = 7; + * @return {string} + */ +proto.cc.arduino.cli.commands.Library.prototype.getCategory = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.Library} returns this + */ +proto.cc.arduino.cli.commands.Library.prototype.setCategory = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + +/** + * repeated string architectures = 8; + * @return {!Array} + */ +proto.cc.arduino.cli.commands.Library.prototype.getArchitecturesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 8)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cc.arduino.cli.commands.Library} returns this + */ +proto.cc.arduino.cli.commands.Library.prototype.setArchitecturesList = function(value) { + return jspb.Message.setField(this, 8, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.cc.arduino.cli.commands.Library} returns this + */ +proto.cc.arduino.cli.commands.Library.prototype.addArchitectures = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 8, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cc.arduino.cli.commands.Library} returns this + */ +proto.cc.arduino.cli.commands.Library.prototype.clearArchitecturesList = function() { + return this.setArchitecturesList([]); +}; + + +/** + * repeated string types = 9; + * @return {!Array} + */ +proto.cc.arduino.cli.commands.Library.prototype.getTypesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 9)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cc.arduino.cli.commands.Library} returns this + */ +proto.cc.arduino.cli.commands.Library.prototype.setTypesList = function(value) { + return jspb.Message.setField(this, 9, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.cc.arduino.cli.commands.Library} returns this + */ +proto.cc.arduino.cli.commands.Library.prototype.addTypes = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 9, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cc.arduino.cli.commands.Library} returns this + */ +proto.cc.arduino.cli.commands.Library.prototype.clearTypesList = function() { + return this.setTypesList([]); +}; + + +/** + * optional string install_dir = 10; + * @return {string} + */ +proto.cc.arduino.cli.commands.Library.prototype.getInstallDir = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.Library} returns this + */ +proto.cc.arduino.cli.commands.Library.prototype.setInstallDir = function(value) { + return jspb.Message.setProto3StringField(this, 10, value); +}; + + +/** + * optional string source_dir = 11; + * @return {string} + */ +proto.cc.arduino.cli.commands.Library.prototype.getSourceDir = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.Library} returns this + */ +proto.cc.arduino.cli.commands.Library.prototype.setSourceDir = function(value) { + return jspb.Message.setProto3StringField(this, 11, value); +}; + + +/** + * optional string utility_dir = 12; + * @return {string} + */ +proto.cc.arduino.cli.commands.Library.prototype.getUtilityDir = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.Library} returns this + */ +proto.cc.arduino.cli.commands.Library.prototype.setUtilityDir = function(value) { + return jspb.Message.setProto3StringField(this, 12, value); +}; + + +/** + * optional string container_platform = 14; + * @return {string} + */ +proto.cc.arduino.cli.commands.Library.prototype.getContainerPlatform = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 14, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.Library} returns this + */ +proto.cc.arduino.cli.commands.Library.prototype.setContainerPlatform = function(value) { + return jspb.Message.setProto3StringField(this, 14, value); +}; + + +/** + * optional string real_name = 16; + * @return {string} + */ +proto.cc.arduino.cli.commands.Library.prototype.getRealName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 16, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.Library} returns this + */ +proto.cc.arduino.cli.commands.Library.prototype.setRealName = function(value) { + return jspb.Message.setProto3StringField(this, 16, value); +}; + + +/** + * optional bool dot_a_linkage = 17; + * @return {boolean} + */ +proto.cc.arduino.cli.commands.Library.prototype.getDotALinkage = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 17, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cc.arduino.cli.commands.Library} returns this + */ +proto.cc.arduino.cli.commands.Library.prototype.setDotALinkage = function(value) { + return jspb.Message.setProto3BooleanField(this, 17, value); +}; + + +/** + * optional bool precompiled = 18; + * @return {boolean} + */ +proto.cc.arduino.cli.commands.Library.prototype.getPrecompiled = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 18, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cc.arduino.cli.commands.Library} returns this + */ +proto.cc.arduino.cli.commands.Library.prototype.setPrecompiled = function(value) { + return jspb.Message.setProto3BooleanField(this, 18, value); +}; + + +/** + * optional string ld_flags = 19; + * @return {string} + */ +proto.cc.arduino.cli.commands.Library.prototype.getLdFlags = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 19, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.Library} returns this + */ +proto.cc.arduino.cli.commands.Library.prototype.setLdFlags = function(value) { + return jspb.Message.setProto3StringField(this, 19, value); +}; + + +/** + * optional bool is_legacy = 20; + * @return {boolean} + */ +proto.cc.arduino.cli.commands.Library.prototype.getIsLegacy = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 20, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cc.arduino.cli.commands.Library} returns this + */ +proto.cc.arduino.cli.commands.Library.prototype.setIsLegacy = function(value) { + return jspb.Message.setProto3BooleanField(this, 20, value); +}; + + +/** + * optional string version = 21; + * @return {string} + */ +proto.cc.arduino.cli.commands.Library.prototype.getVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 21, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.Library} returns this + */ +proto.cc.arduino.cli.commands.Library.prototype.setVersion = function(value) { + return jspb.Message.setProto3StringField(this, 21, value); +}; + + +/** + * optional string license = 22; + * @return {string} + */ +proto.cc.arduino.cli.commands.Library.prototype.getLicense = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 22, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.Library} returns this + */ +proto.cc.arduino.cli.commands.Library.prototype.setLicense = function(value) { + return jspb.Message.setProto3StringField(this, 22, value); +}; + + +/** + * map properties = 23; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.cc.arduino.cli.commands.Library.prototype.getPropertiesMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 23, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.cc.arduino.cli.commands.Library} returns this + */ +proto.cc.arduino.cli.commands.Library.prototype.clearPropertiesMap = function() { + this.getPropertiesMap().clear(); + return this;}; + + +/** + * optional LibraryLocation location = 24; + * @return {!proto.cc.arduino.cli.commands.LibraryLocation} + */ +proto.cc.arduino.cli.commands.Library.prototype.getLocation = function() { + return /** @type {!proto.cc.arduino.cli.commands.LibraryLocation} */ (jspb.Message.getFieldWithDefault(this, 24, 0)); +}; + + +/** + * @param {!proto.cc.arduino.cli.commands.LibraryLocation} value + * @return {!proto.cc.arduino.cli.commands.Library} returns this + */ +proto.cc.arduino.cli.commands.Library.prototype.setLocation = function(value) { + return jspb.Message.setProto3EnumField(this, 24, value); +}; + + +/** + * optional LibraryLayout layout = 25; + * @return {!proto.cc.arduino.cli.commands.LibraryLayout} + */ +proto.cc.arduino.cli.commands.Library.prototype.getLayout = function() { + return /** @type {!proto.cc.arduino.cli.commands.LibraryLayout} */ (jspb.Message.getFieldWithDefault(this, 25, 0)); +}; + + +/** + * @param {!proto.cc.arduino.cli.commands.LibraryLayout} value + * @return {!proto.cc.arduino.cli.commands.Library} returns this + */ +proto.cc.arduino.cli.commands.Library.prototype.setLayout = function(value) { + return jspb.Message.setProto3EnumField(this, 25, value); +}; + + +/** + * @enum {number} + */ +proto.cc.arduino.cli.commands.LibrarySearchStatus = { + FAILED: 0, + SUCCESS: 1 +}; + +/** + * @enum {number} + */ +proto.cc.arduino.cli.commands.LibraryLayout = { + FLAT_LAYOUT: 0, + RECURSIVE_LAYOUT: 1 +}; + +/** + * @enum {number} + */ +proto.cc.arduino.cli.commands.LibraryLocation = { + IDE_BUILTIN: 0, + USER: 1, + PLATFORM_BUILTIN: 2, + REFERENCED_PLATFORM_BUILTIN: 3 +}; + +goog.object.extend(exports, proto.cc.arduino.cli.commands); diff --git a/arduino-ide-extension/src/node/cli-protocol/commands/upload_grpc_pb.js b/arduino-ide-extension/src/node/cli-protocol/commands/upload_grpc_pb.js new file mode 100644 index 00000000..97b3a246 --- /dev/null +++ b/arduino-ide-extension/src/node/cli-protocol/commands/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/commands/upload_pb.d.ts b/arduino-ide-extension/src/node/cli-protocol/commands/upload_pb.d.ts new file mode 100644 index 00000000..6a004981 --- /dev/null +++ b/arduino-ide-extension/src/node/cli-protocol/commands/upload_pb.d.ts @@ -0,0 +1,246 @@ +// package: cc.arduino.cli.commands +// file: commands/upload.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; +import * as commands_common_pb from "../commands/common_pb"; + +export class UploadReq extends jspb.Message { + + hasInstance(): boolean; + clearInstance(): void; + getInstance(): commands_common_pb.Instance | undefined; + setInstance(value?: commands_common_pb.Instance): UploadReq; + + getFqbn(): string; + setFqbn(value: string): UploadReq; + + getSketchPath(): string; + setSketchPath(value: string): UploadReq; + + getPort(): string; + setPort(value: string): UploadReq; + + getVerbose(): boolean; + setVerbose(value: boolean): UploadReq; + + getVerify(): boolean; + setVerify(value: boolean): UploadReq; + + getImportFile(): string; + setImportFile(value: string): UploadReq; + + getImportDir(): string; + setImportDir(value: string): UploadReq; + + getProgrammer(): string; + setProgrammer(value: string): UploadReq; + + + 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?: commands_common_pb.Instance.AsObject, + fqbn: string, + sketchPath: string, + port: string, + verbose: boolean, + verify: boolean, + importFile: string, + importDir: string, + programmer: string, + } +} + +export class UploadResp extends jspb.Message { + getOutStream(): Uint8Array | string; + getOutStream_asU8(): Uint8Array; + getOutStream_asB64(): string; + setOutStream(value: Uint8Array | string): UploadResp; + + getErrStream(): Uint8Array | string; + getErrStream_asU8(): Uint8Array; + getErrStream_asB64(): string; + setErrStream(value: Uint8Array | string): UploadResp; + + + 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, + } +} + +export class BurnBootloaderReq extends jspb.Message { + + hasInstance(): boolean; + clearInstance(): void; + getInstance(): commands_common_pb.Instance | undefined; + setInstance(value?: commands_common_pb.Instance): BurnBootloaderReq; + + getFqbn(): string; + setFqbn(value: string): BurnBootloaderReq; + + getPort(): string; + setPort(value: string): BurnBootloaderReq; + + getVerbose(): boolean; + setVerbose(value: boolean): BurnBootloaderReq; + + getVerify(): boolean; + setVerify(value: boolean): BurnBootloaderReq; + + getProgrammer(): string; + setProgrammer(value: string): BurnBootloaderReq; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BurnBootloaderReq.AsObject; + static toObject(includeInstance: boolean, msg: BurnBootloaderReq): BurnBootloaderReq.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BurnBootloaderReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BurnBootloaderReq; + static deserializeBinaryFromReader(message: BurnBootloaderReq, reader: jspb.BinaryReader): BurnBootloaderReq; +} + +export namespace BurnBootloaderReq { + export type AsObject = { + instance?: commands_common_pb.Instance.AsObject, + fqbn: string, + port: string, + verbose: boolean, + verify: boolean, + programmer: string, + } +} + +export class BurnBootloaderResp extends jspb.Message { + getOutStream(): Uint8Array | string; + getOutStream_asU8(): Uint8Array; + getOutStream_asB64(): string; + setOutStream(value: Uint8Array | string): BurnBootloaderResp; + + getErrStream(): Uint8Array | string; + getErrStream_asU8(): Uint8Array; + getErrStream_asB64(): string; + setErrStream(value: Uint8Array | string): BurnBootloaderResp; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BurnBootloaderResp.AsObject; + static toObject(includeInstance: boolean, msg: BurnBootloaderResp): BurnBootloaderResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BurnBootloaderResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BurnBootloaderResp; + static deserializeBinaryFromReader(message: BurnBootloaderResp, reader: jspb.BinaryReader): BurnBootloaderResp; +} + +export namespace BurnBootloaderResp { + export type AsObject = { + outStream: Uint8Array | string, + errStream: Uint8Array | string, + } +} + +export class ListProgrammersAvailableForUploadReq extends jspb.Message { + + hasInstance(): boolean; + clearInstance(): void; + getInstance(): commands_common_pb.Instance | undefined; + setInstance(value?: commands_common_pb.Instance): ListProgrammersAvailableForUploadReq; + + getFqbn(): string; + setFqbn(value: string): ListProgrammersAvailableForUploadReq; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListProgrammersAvailableForUploadReq.AsObject; + static toObject(includeInstance: boolean, msg: ListProgrammersAvailableForUploadReq): ListProgrammersAvailableForUploadReq.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ListProgrammersAvailableForUploadReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListProgrammersAvailableForUploadReq; + static deserializeBinaryFromReader(message: ListProgrammersAvailableForUploadReq, reader: jspb.BinaryReader): ListProgrammersAvailableForUploadReq; +} + +export namespace ListProgrammersAvailableForUploadReq { + export type AsObject = { + instance?: commands_common_pb.Instance.AsObject, + fqbn: string, + } +} + +export class ListProgrammersAvailableForUploadResp extends jspb.Message { + clearProgrammersList(): void; + getProgrammersList(): Array; + setProgrammersList(value: Array): ListProgrammersAvailableForUploadResp; + addProgrammers(value?: Programmer, index?: number): Programmer; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListProgrammersAvailableForUploadResp.AsObject; + static toObject(includeInstance: boolean, msg: ListProgrammersAvailableForUploadResp): ListProgrammersAvailableForUploadResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ListProgrammersAvailableForUploadResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListProgrammersAvailableForUploadResp; + static deserializeBinaryFromReader(message: ListProgrammersAvailableForUploadResp, reader: jspb.BinaryReader): ListProgrammersAvailableForUploadResp; +} + +export namespace ListProgrammersAvailableForUploadResp { + export type AsObject = { + programmersList: Array, + } +} + +export class Programmer extends jspb.Message { + getPlatform(): string; + setPlatform(value: string): Programmer; + + getId(): string; + setId(value: string): Programmer; + + getName(): string; + setName(value: string): Programmer; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Programmer.AsObject; + static toObject(includeInstance: boolean, msg: Programmer): Programmer.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Programmer, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Programmer; + static deserializeBinaryFromReader(message: Programmer, reader: jspb.BinaryReader): Programmer; +} + +export namespace Programmer { + export type AsObject = { + platform: string, + id: string, + name: string, + } +} diff --git a/arduino-ide-extension/src/node/cli-protocol/commands/upload_pb.js b/arduino-ide-extension/src/node/cli-protocol/commands/upload_pb.js new file mode 100644 index 00000000..ff16e620 --- /dev/null +++ b/arduino-ide-extension/src/node/cli-protocol/commands/upload_pb.js @@ -0,0 +1,1810 @@ +// source: commands/upload.proto +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var commands_common_pb = require('../commands/common_pb.js'); +goog.object.extend(proto, commands_common_pb); +goog.exportSymbol('proto.cc.arduino.cli.commands.BurnBootloaderReq', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.BurnBootloaderResp', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.ListProgrammersAvailableForUploadReq', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.ListProgrammersAvailableForUploadResp', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.Programmer', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.UploadReq', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.UploadReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.UploadReq, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.UploadReq.displayName = 'proto.cc.arduino.cli.commands.UploadReq'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.UploadResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.UploadResp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.UploadResp.displayName = 'proto.cc.arduino.cli.commands.UploadResp'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.BurnBootloaderReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.BurnBootloaderReq, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.BurnBootloaderReq.displayName = 'proto.cc.arduino.cli.commands.BurnBootloaderReq'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.BurnBootloaderResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.BurnBootloaderResp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.BurnBootloaderResp.displayName = 'proto.cc.arduino.cli.commands.BurnBootloaderResp'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.ListProgrammersAvailableForUploadReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.ListProgrammersAvailableForUploadReq, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.ListProgrammersAvailableForUploadReq.displayName = 'proto.cc.arduino.cli.commands.ListProgrammersAvailableForUploadReq'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.ListProgrammersAvailableForUploadResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cc.arduino.cli.commands.ListProgrammersAvailableForUploadResp.repeatedFields_, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.ListProgrammersAvailableForUploadResp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.ListProgrammersAvailableForUploadResp.displayName = 'proto.cc.arduino.cli.commands.ListProgrammersAvailableForUploadResp'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.Programmer = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.Programmer, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.Programmer.displayName = 'proto.cc.arduino.cli.commands.Programmer'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.UploadReq.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.UploadReq.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.UploadReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.UploadReq.toObject = function(includeInstance, msg) { + var f, obj = { + instance: (f = msg.getInstance()) && commands_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.getBooleanFieldWithDefault(msg, 5, false), + verify: jspb.Message.getBooleanFieldWithDefault(msg, 6, false), + importFile: jspb.Message.getFieldWithDefault(msg, 7, ""), + importDir: jspb.Message.getFieldWithDefault(msg, 8, ""), + programmer: jspb.Message.getFieldWithDefault(msg, 9, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cc.arduino.cli.commands.UploadReq} + */ +proto.cc.arduino.cli.commands.UploadReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.UploadReq; + return proto.cc.arduino.cli.commands.UploadReq.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.UploadReq} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.UploadReq} + */ +proto.cc.arduino.cli.commands.UploadReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new commands_common_pb.Instance; + reader.readMessage(value,commands_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; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setImportDir(value); + break; + case 9: + var value = /** @type {string} */ (reader.readString()); + msg.setProgrammer(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.commands.UploadReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.UploadReq} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.UploadReq.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInstance(); + if (f != null) { + writer.writeMessage( + 1, + f, + commands_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 + ); + } + f = message.getImportDir(); + if (f.length > 0) { + writer.writeString( + 8, + f + ); + } + f = message.getProgrammer(); + if (f.length > 0) { + writer.writeString( + 9, + f + ); + } +}; + + +/** + * optional Instance instance = 1; + * @return {?proto.cc.arduino.cli.commands.Instance} + */ +proto.cc.arduino.cli.commands.UploadReq.prototype.getInstance = function() { + return /** @type{?proto.cc.arduino.cli.commands.Instance} */ ( + jspb.Message.getWrapperField(this, commands_common_pb.Instance, 1)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.Instance|undefined} value + * @return {!proto.cc.arduino.cli.commands.UploadReq} returns this +*/ +proto.cc.arduino.cli.commands.UploadReq.prototype.setInstance = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.UploadReq} returns this + */ +proto.cc.arduino.cli.commands.UploadReq.prototype.clearInstance = function() { + return this.setInstance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.UploadReq.prototype.hasInstance = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string fqbn = 2; + * @return {string} + */ +proto.cc.arduino.cli.commands.UploadReq.prototype.getFqbn = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.UploadReq} returns this + */ +proto.cc.arduino.cli.commands.UploadReq.prototype.setFqbn = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string sketch_path = 3; + * @return {string} + */ +proto.cc.arduino.cli.commands.UploadReq.prototype.getSketchPath = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.UploadReq} returns this + */ +proto.cc.arduino.cli.commands.UploadReq.prototype.setSketchPath = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string port = 4; + * @return {string} + */ +proto.cc.arduino.cli.commands.UploadReq.prototype.getPort = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.UploadReq} returns this + */ +proto.cc.arduino.cli.commands.UploadReq.prototype.setPort = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional bool verbose = 5; + * @return {boolean} + */ +proto.cc.arduino.cli.commands.UploadReq.prototype.getVerbose = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cc.arduino.cli.commands.UploadReq} returns this + */ +proto.cc.arduino.cli.commands.UploadReq.prototype.setVerbose = function(value) { + return jspb.Message.setProto3BooleanField(this, 5, value); +}; + + +/** + * optional bool verify = 6; + * @return {boolean} + */ +proto.cc.arduino.cli.commands.UploadReq.prototype.getVerify = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cc.arduino.cli.commands.UploadReq} returns this + */ +proto.cc.arduino.cli.commands.UploadReq.prototype.setVerify = function(value) { + return jspb.Message.setProto3BooleanField(this, 6, value); +}; + + +/** + * optional string import_file = 7; + * @return {string} + */ +proto.cc.arduino.cli.commands.UploadReq.prototype.getImportFile = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.UploadReq} returns this + */ +proto.cc.arduino.cli.commands.UploadReq.prototype.setImportFile = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + +/** + * optional string import_dir = 8; + * @return {string} + */ +proto.cc.arduino.cli.commands.UploadReq.prototype.getImportDir = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.UploadReq} returns this + */ +proto.cc.arduino.cli.commands.UploadReq.prototype.setImportDir = function(value) { + return jspb.Message.setProto3StringField(this, 8, value); +}; + + +/** + * optional string programmer = 9; + * @return {string} + */ +proto.cc.arduino.cli.commands.UploadReq.prototype.getProgrammer = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.UploadReq} returns this + */ +proto.cc.arduino.cli.commands.UploadReq.prototype.setProgrammer = function(value) { + return jspb.Message.setProto3StringField(this, 9, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.UploadResp.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.UploadResp.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.UploadResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.UploadResp} + */ +proto.cc.arduino.cli.commands.UploadResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.UploadResp; + return proto.cc.arduino.cli.commands.UploadResp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.UploadResp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.UploadResp} + */ +proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.UploadResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.UploadResp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.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.cc.arduino.cli.commands.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.cc.arduino.cli.commands.UploadResp.prototype.getOutStream_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getOutStream())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cc.arduino.cli.commands.UploadResp} returns this + */ +proto.cc.arduino.cli.commands.UploadResp.prototype.setOutStream = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes err_stream = 2; + * @return {!(string|Uint8Array)} + */ +proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.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.cc.arduino.cli.commands.UploadResp.prototype.getErrStream_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getErrStream())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cc.arduino.cli.commands.UploadResp} returns this + */ +proto.cc.arduino.cli.commands.UploadResp.prototype.setErrStream = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.BurnBootloaderReq.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.BurnBootloaderReq.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.BurnBootloaderReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.BurnBootloaderReq.toObject = function(includeInstance, msg) { + var f, obj = { + instance: (f = msg.getInstance()) && commands_common_pb.Instance.toObject(includeInstance, f), + fqbn: jspb.Message.getFieldWithDefault(msg, 2, ""), + port: jspb.Message.getFieldWithDefault(msg, 3, ""), + verbose: jspb.Message.getBooleanFieldWithDefault(msg, 4, false), + verify: jspb.Message.getBooleanFieldWithDefault(msg, 5, false), + programmer: 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.cc.arduino.cli.commands.BurnBootloaderReq} + */ +proto.cc.arduino.cli.commands.BurnBootloaderReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.BurnBootloaderReq; + return proto.cc.arduino.cli.commands.BurnBootloaderReq.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.BurnBootloaderReq} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.BurnBootloaderReq} + */ +proto.cc.arduino.cli.commands.BurnBootloaderReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new commands_common_pb.Instance; + reader.readMessage(value,commands_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.setPort(value); + break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setVerbose(value); + break; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setVerify(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setProgrammer(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.commands.BurnBootloaderReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.BurnBootloaderReq.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cc.arduino.cli.commands.BurnBootloaderReq} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.BurnBootloaderReq.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInstance(); + if (f != null) { + writer.writeMessage( + 1, + f, + commands_common_pb.Instance.serializeBinaryToWriter + ); + } + f = message.getFqbn(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getPort(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getVerbose(); + if (f) { + writer.writeBool( + 4, + f + ); + } + f = message.getVerify(); + if (f) { + writer.writeBool( + 5, + f + ); + } + f = message.getProgrammer(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } +}; + + +/** + * optional Instance instance = 1; + * @return {?proto.cc.arduino.cli.commands.Instance} + */ +proto.cc.arduino.cli.commands.BurnBootloaderReq.prototype.getInstance = function() { + return /** @type{?proto.cc.arduino.cli.commands.Instance} */ ( + jspb.Message.getWrapperField(this, commands_common_pb.Instance, 1)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.Instance|undefined} value + * @return {!proto.cc.arduino.cli.commands.BurnBootloaderReq} returns this +*/ +proto.cc.arduino.cli.commands.BurnBootloaderReq.prototype.setInstance = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.BurnBootloaderReq} returns this + */ +proto.cc.arduino.cli.commands.BurnBootloaderReq.prototype.clearInstance = function() { + return this.setInstance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.BurnBootloaderReq.prototype.hasInstance = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string fqbn = 2; + * @return {string} + */ +proto.cc.arduino.cli.commands.BurnBootloaderReq.prototype.getFqbn = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.BurnBootloaderReq} returns this + */ +proto.cc.arduino.cli.commands.BurnBootloaderReq.prototype.setFqbn = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string port = 3; + * @return {string} + */ +proto.cc.arduino.cli.commands.BurnBootloaderReq.prototype.getPort = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.BurnBootloaderReq} returns this + */ +proto.cc.arduino.cli.commands.BurnBootloaderReq.prototype.setPort = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional bool verbose = 4; + * @return {boolean} + */ +proto.cc.arduino.cli.commands.BurnBootloaderReq.prototype.getVerbose = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cc.arduino.cli.commands.BurnBootloaderReq} returns this + */ +proto.cc.arduino.cli.commands.BurnBootloaderReq.prototype.setVerbose = function(value) { + return jspb.Message.setProto3BooleanField(this, 4, value); +}; + + +/** + * optional bool verify = 5; + * @return {boolean} + */ +proto.cc.arduino.cli.commands.BurnBootloaderReq.prototype.getVerify = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cc.arduino.cli.commands.BurnBootloaderReq} returns this + */ +proto.cc.arduino.cli.commands.BurnBootloaderReq.prototype.setVerify = function(value) { + return jspb.Message.setProto3BooleanField(this, 5, value); +}; + + +/** + * optional string programmer = 6; + * @return {string} + */ +proto.cc.arduino.cli.commands.BurnBootloaderReq.prototype.getProgrammer = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.BurnBootloaderReq} returns this + */ +proto.cc.arduino.cli.commands.BurnBootloaderReq.prototype.setProgrammer = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.BurnBootloaderResp.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.BurnBootloaderResp.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.BurnBootloaderResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.BurnBootloaderResp.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.cc.arduino.cli.commands.BurnBootloaderResp} + */ +proto.cc.arduino.cli.commands.BurnBootloaderResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.BurnBootloaderResp; + return proto.cc.arduino.cli.commands.BurnBootloaderResp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.BurnBootloaderResp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.BurnBootloaderResp} + */ +proto.cc.arduino.cli.commands.BurnBootloaderResp.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.cc.arduino.cli.commands.BurnBootloaderResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.BurnBootloaderResp.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cc.arduino.cli.commands.BurnBootloaderResp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.BurnBootloaderResp.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.cc.arduino.cli.commands.BurnBootloaderResp.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.cc.arduino.cli.commands.BurnBootloaderResp.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.cc.arduino.cli.commands.BurnBootloaderResp.prototype.getOutStream_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getOutStream())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cc.arduino.cli.commands.BurnBootloaderResp} returns this + */ +proto.cc.arduino.cli.commands.BurnBootloaderResp.prototype.setOutStream = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes err_stream = 2; + * @return {!(string|Uint8Array)} + */ +proto.cc.arduino.cli.commands.BurnBootloaderResp.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.cc.arduino.cli.commands.BurnBootloaderResp.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.cc.arduino.cli.commands.BurnBootloaderResp.prototype.getErrStream_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getErrStream())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cc.arduino.cli.commands.BurnBootloaderResp} returns this + */ +proto.cc.arduino.cli.commands.BurnBootloaderResp.prototype.setErrStream = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.ListProgrammersAvailableForUploadReq.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.ListProgrammersAvailableForUploadReq.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.ListProgrammersAvailableForUploadReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.ListProgrammersAvailableForUploadReq.toObject = function(includeInstance, msg) { + var f, obj = { + instance: (f = msg.getInstance()) && commands_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.cc.arduino.cli.commands.ListProgrammersAvailableForUploadReq} + */ +proto.cc.arduino.cli.commands.ListProgrammersAvailableForUploadReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.ListProgrammersAvailableForUploadReq; + return proto.cc.arduino.cli.commands.ListProgrammersAvailableForUploadReq.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.ListProgrammersAvailableForUploadReq} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.ListProgrammersAvailableForUploadReq} + */ +proto.cc.arduino.cli.commands.ListProgrammersAvailableForUploadReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new commands_common_pb.Instance; + reader.readMessage(value,commands_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.cc.arduino.cli.commands.ListProgrammersAvailableForUploadReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.ListProgrammersAvailableForUploadReq.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cc.arduino.cli.commands.ListProgrammersAvailableForUploadReq} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.ListProgrammersAvailableForUploadReq.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInstance(); + if (f != null) { + writer.writeMessage( + 1, + f, + commands_common_pb.Instance.serializeBinaryToWriter + ); + } + f = message.getFqbn(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional Instance instance = 1; + * @return {?proto.cc.arduino.cli.commands.Instance} + */ +proto.cc.arduino.cli.commands.ListProgrammersAvailableForUploadReq.prototype.getInstance = function() { + return /** @type{?proto.cc.arduino.cli.commands.Instance} */ ( + jspb.Message.getWrapperField(this, commands_common_pb.Instance, 1)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.Instance|undefined} value + * @return {!proto.cc.arduino.cli.commands.ListProgrammersAvailableForUploadReq} returns this +*/ +proto.cc.arduino.cli.commands.ListProgrammersAvailableForUploadReq.prototype.setInstance = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.ListProgrammersAvailableForUploadReq} returns this + */ +proto.cc.arduino.cli.commands.ListProgrammersAvailableForUploadReq.prototype.clearInstance = function() { + return this.setInstance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.ListProgrammersAvailableForUploadReq.prototype.hasInstance = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string fqbn = 2; + * @return {string} + */ +proto.cc.arduino.cli.commands.ListProgrammersAvailableForUploadReq.prototype.getFqbn = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.ListProgrammersAvailableForUploadReq} returns this + */ +proto.cc.arduino.cli.commands.ListProgrammersAvailableForUploadReq.prototype.setFqbn = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cc.arduino.cli.commands.ListProgrammersAvailableForUploadResp.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.ListProgrammersAvailableForUploadResp.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.ListProgrammersAvailableForUploadResp.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.ListProgrammersAvailableForUploadResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.ListProgrammersAvailableForUploadResp.toObject = function(includeInstance, msg) { + var f, obj = { + programmersList: jspb.Message.toObjectList(msg.getProgrammersList(), + proto.cc.arduino.cli.commands.Programmer.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.cc.arduino.cli.commands.ListProgrammersAvailableForUploadResp} + */ +proto.cc.arduino.cli.commands.ListProgrammersAvailableForUploadResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.ListProgrammersAvailableForUploadResp; + return proto.cc.arduino.cli.commands.ListProgrammersAvailableForUploadResp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.ListProgrammersAvailableForUploadResp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.ListProgrammersAvailableForUploadResp} + */ +proto.cc.arduino.cli.commands.ListProgrammersAvailableForUploadResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cc.arduino.cli.commands.Programmer; + reader.readMessage(value,proto.cc.arduino.cli.commands.Programmer.deserializeBinaryFromReader); + msg.addProgrammers(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.commands.ListProgrammersAvailableForUploadResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.ListProgrammersAvailableForUploadResp.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cc.arduino.cli.commands.ListProgrammersAvailableForUploadResp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.ListProgrammersAvailableForUploadResp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProgrammersList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.cc.arduino.cli.commands.Programmer.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Programmer programmers = 1; + * @return {!Array} + */ +proto.cc.arduino.cli.commands.ListProgrammersAvailableForUploadResp.prototype.getProgrammersList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cc.arduino.cli.commands.Programmer, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cc.arduino.cli.commands.ListProgrammersAvailableForUploadResp} returns this +*/ +proto.cc.arduino.cli.commands.ListProgrammersAvailableForUploadResp.prototype.setProgrammersList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cc.arduino.cli.commands.Programmer=} opt_value + * @param {number=} opt_index + * @return {!proto.cc.arduino.cli.commands.Programmer} + */ +proto.cc.arduino.cli.commands.ListProgrammersAvailableForUploadResp.prototype.addProgrammers = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cc.arduino.cli.commands.Programmer, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cc.arduino.cli.commands.ListProgrammersAvailableForUploadResp} returns this + */ +proto.cc.arduino.cli.commands.ListProgrammersAvailableForUploadResp.prototype.clearProgrammersList = function() { + return this.setProgrammersList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.Programmer.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.Programmer.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.Programmer} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.Programmer.toObject = function(includeInstance, msg) { + var f, obj = { + platform: jspb.Message.getFieldWithDefault(msg, 1, ""), + id: jspb.Message.getFieldWithDefault(msg, 2, ""), + name: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cc.arduino.cli.commands.Programmer} + */ +proto.cc.arduino.cli.commands.Programmer.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.Programmer; + return proto.cc.arduino.cli.commands.Programmer.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.Programmer} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.Programmer} + */ +proto.cc.arduino.cli.commands.Programmer.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPlatform(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.commands.Programmer.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.Programmer.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cc.arduino.cli.commands.Programmer} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.Programmer.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPlatform(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string platform = 1; + * @return {string} + */ +proto.cc.arduino.cli.commands.Programmer.prototype.getPlatform = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.Programmer} returns this + */ +proto.cc.arduino.cli.commands.Programmer.prototype.setPlatform = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string id = 2; + * @return {string} + */ +proto.cc.arduino.cli.commands.Programmer.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.Programmer} returns this + */ +proto.cc.arduino.cli.commands.Programmer.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string name = 3; + * @return {string} + */ +proto.cc.arduino.cli.commands.Programmer.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.Programmer} returns this + */ +proto.cc.arduino.cli.commands.Programmer.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +goog.object.extend(exports, proto.cc.arduino.cli.commands); diff --git a/arduino-ide-extension/src/node/cli-protocol/debug/debug_grpc_pb.d.ts b/arduino-ide-extension/src/node/cli-protocol/debug/debug_grpc_pb.d.ts new file mode 100644 index 00000000..6104b75f --- /dev/null +++ b/arduino-ide-extension/src/node/cli-protocol/debug/debug_grpc_pb.d.ts @@ -0,0 +1,42 @@ +// package: cc.arduino.cli.debug +// file: debug/debug.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as grpc from "@grpc/grpc-js"; +import {handleClientStreamingCall} from "@grpc/grpc-js/build/src/server-call"; +import * as debug_debug_pb from "../debug/debug_pb"; +import * as commands_common_pb from "../commands/common_pb"; + +interface IDebugService extends grpc.ServiceDefinition { + debug: IDebugService_IDebug; +} + +interface IDebugService_IDebug extends grpc.MethodDefinition { + path: string; // "/cc.arduino.cli.debug.Debug/Debug" + requestStream: true; + responseStream: true; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} + +export const DebugService: IDebugService; + +export interface IDebugServer { + debug: grpc.handleBidiStreamingCall; +} + +export interface IDebugClient { + debug(): grpc.ClientDuplexStream; + debug(options: Partial): grpc.ClientDuplexStream; + debug(metadata: grpc.Metadata, options?: Partial): grpc.ClientDuplexStream; +} + +export class DebugClient extends grpc.Client implements IDebugClient { + constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); + public debug(options?: Partial): grpc.ClientDuplexStream; + public debug(metadata?: grpc.Metadata, options?: Partial): grpc.ClientDuplexStream; +} diff --git a/arduino-ide-extension/src/node/cli-protocol/debug/debug_grpc_pb.js b/arduino-ide-extension/src/node/cli-protocol/debug/debug_grpc_pb.js new file mode 100644 index 00000000..85621d86 --- /dev/null +++ b/arduino-ide-extension/src/node/cli-protocol/debug/debug_grpc_pb.js @@ -0,0 +1,61 @@ +// GENERATED CODE -- DO NOT EDIT! + +// Original file comments: +// This file is part of arduino-cli. +// +// Copyright 2020 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 debug_debug_pb = require('../debug/debug_pb.js'); +var commands_common_pb = require('../commands/common_pb.js'); + +function serialize_cc_arduino_cli_debug_DebugReq(arg) { + if (!(arg instanceof debug_debug_pb.DebugReq)) { + throw new Error('Expected argument of type cc.arduino.cli.debug.DebugReq'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_debug_DebugReq(buffer_arg) { + return debug_debug_pb.DebugReq.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_debug_DebugResp(arg) { + if (!(arg instanceof debug_debug_pb.DebugResp)) { + throw new Error('Expected argument of type cc.arduino.cli.debug.DebugResp'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_debug_DebugResp(buffer_arg) { + return debug_debug_pb.DebugResp.deserializeBinary(new Uint8Array(buffer_arg)); +} + + +// Service that abstract a debug Session usage +var DebugService = exports['cc.arduino.cli.debug.Debug'] = { + // Start a debug session and communicate with the debugger tool. +debug: { + path: '/cc.arduino.cli.debug.Debug/Debug', + requestStream: true, + responseStream: true, + requestType: debug_debug_pb.DebugReq, + responseType: debug_debug_pb.DebugResp, + requestSerialize: serialize_cc_arduino_cli_debug_DebugReq, + requestDeserialize: deserialize_cc_arduino_cli_debug_DebugReq, + responseSerialize: serialize_cc_arduino_cli_debug_DebugResp, + responseDeserialize: deserialize_cc_arduino_cli_debug_DebugResp, + }, +}; + diff --git a/arduino-ide-extension/src/node/cli-protocol/debug/debug_pb.d.ts b/arduino-ide-extension/src/node/cli-protocol/debug/debug_pb.d.ts new file mode 100644 index 00000000..135faa27 --- /dev/null +++ b/arduino-ide-extension/src/node/cli-protocol/debug/debug_pb.d.ts @@ -0,0 +1,117 @@ +// package: cc.arduino.cli.debug +// file: debug/debug.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; +import * as commands_common_pb from "../commands/common_pb"; + +export class DebugReq extends jspb.Message { + + hasDebugreq(): boolean; + clearDebugreq(): void; + getDebugreq(): DebugConfigReq | undefined; + setDebugreq(value?: DebugConfigReq): DebugReq; + + getData(): Uint8Array | string; + getData_asU8(): Uint8Array; + getData_asB64(): string; + setData(value: Uint8Array | string): DebugReq; + + getSendInterrupt(): boolean; + setSendInterrupt(value: boolean): DebugReq; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DebugReq.AsObject; + static toObject(includeInstance: boolean, msg: DebugReq): DebugReq.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DebugReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DebugReq; + static deserializeBinaryFromReader(message: DebugReq, reader: jspb.BinaryReader): DebugReq; +} + +export namespace DebugReq { + export type AsObject = { + debugreq?: DebugConfigReq.AsObject, + data: Uint8Array | string, + sendInterrupt: boolean, + } +} + +export class DebugConfigReq extends jspb.Message { + + hasInstance(): boolean; + clearInstance(): void; + getInstance(): commands_common_pb.Instance | undefined; + setInstance(value?: commands_common_pb.Instance): DebugConfigReq; + + getFqbn(): string; + setFqbn(value: string): DebugConfigReq; + + getSketchPath(): string; + setSketchPath(value: string): DebugConfigReq; + + getPort(): string; + setPort(value: string): DebugConfigReq; + + getInterpreter(): string; + setInterpreter(value: string): DebugConfigReq; + + getImportFile(): string; + setImportFile(value: string): DebugConfigReq; + + getImportDir(): string; + setImportDir(value: string): DebugConfigReq; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DebugConfigReq.AsObject; + static toObject(includeInstance: boolean, msg: DebugConfigReq): DebugConfigReq.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DebugConfigReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DebugConfigReq; + static deserializeBinaryFromReader(message: DebugConfigReq, reader: jspb.BinaryReader): DebugConfigReq; +} + +export namespace DebugConfigReq { + export type AsObject = { + instance?: commands_common_pb.Instance.AsObject, + fqbn: string, + sketchPath: string, + port: string, + interpreter: string, + importFile: string, + importDir: string, + } +} + +export class DebugResp extends jspb.Message { + getData(): Uint8Array | string; + getData_asU8(): Uint8Array; + getData_asB64(): string; + setData(value: Uint8Array | string): DebugResp; + + getError(): string; + setError(value: string): DebugResp; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DebugResp.AsObject; + static toObject(includeInstance: boolean, msg: DebugResp): DebugResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DebugResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DebugResp; + static deserializeBinaryFromReader(message: DebugResp, reader: jspb.BinaryReader): DebugResp; +} + +export namespace DebugResp { + export type AsObject = { + data: Uint8Array | string, + error: string, + } +} diff --git a/arduino-ide-extension/src/node/cli-protocol/debug/debug_pb.js b/arduino-ide-extension/src/node/cli-protocol/debug/debug_pb.js new file mode 100644 index 00000000..43d405e4 --- /dev/null +++ b/arduino-ide-extension/src/node/cli-protocol/debug/debug_pb.js @@ -0,0 +1,833 @@ +// source: debug/debug.proto +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var commands_common_pb = require('../commands/common_pb.js'); +goog.object.extend(proto, commands_common_pb); +goog.exportSymbol('proto.cc.arduino.cli.debug.DebugConfigReq', null, global); +goog.exportSymbol('proto.cc.arduino.cli.debug.DebugReq', null, global); +goog.exportSymbol('proto.cc.arduino.cli.debug.DebugResp', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.debug.DebugReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.debug.DebugReq, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.debug.DebugReq.displayName = 'proto.cc.arduino.cli.debug.DebugReq'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.debug.DebugConfigReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.debug.DebugConfigReq, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.debug.DebugConfigReq.displayName = 'proto.cc.arduino.cli.debug.DebugConfigReq'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.debug.DebugResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.debug.DebugResp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.debug.DebugResp.displayName = 'proto.cc.arduino.cli.debug.DebugResp'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.debug.DebugReq.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.debug.DebugReq.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.debug.DebugReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.debug.DebugReq.toObject = function(includeInstance, msg) { + var f, obj = { + debugreq: (f = msg.getDebugreq()) && proto.cc.arduino.cli.debug.DebugConfigReq.toObject(includeInstance, f), + data: msg.getData_asB64(), + sendInterrupt: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cc.arduino.cli.debug.DebugReq} + */ +proto.cc.arduino.cli.debug.DebugReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.debug.DebugReq; + return proto.cc.arduino.cli.debug.DebugReq.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.debug.DebugReq} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.debug.DebugReq} + */ +proto.cc.arduino.cli.debug.DebugReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cc.arduino.cli.debug.DebugConfigReq; + reader.readMessage(value,proto.cc.arduino.cli.debug.DebugConfigReq.deserializeBinaryFromReader); + msg.setDebugreq(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setSendInterrupt(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.debug.DebugReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.debug.DebugReq.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cc.arduino.cli.debug.DebugReq} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.debug.DebugReq.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDebugreq(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.cc.arduino.cli.debug.DebugConfigReq.serializeBinaryToWriter + ); + } + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getSendInterrupt(); + if (f) { + writer.writeBool( + 3, + f + ); + } +}; + + +/** + * optional DebugConfigReq debugReq = 1; + * @return {?proto.cc.arduino.cli.debug.DebugConfigReq} + */ +proto.cc.arduino.cli.debug.DebugReq.prototype.getDebugreq = function() { + return /** @type{?proto.cc.arduino.cli.debug.DebugConfigReq} */ ( + jspb.Message.getWrapperField(this, proto.cc.arduino.cli.debug.DebugConfigReq, 1)); +}; + + +/** + * @param {?proto.cc.arduino.cli.debug.DebugConfigReq|undefined} value + * @return {!proto.cc.arduino.cli.debug.DebugReq} returns this +*/ +proto.cc.arduino.cli.debug.DebugReq.prototype.setDebugreq = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.debug.DebugReq} returns this + */ +proto.cc.arduino.cli.debug.DebugReq.prototype.clearDebugreq = function() { + return this.setDebugreq(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.debug.DebugReq.prototype.hasDebugreq = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bytes data = 2; + * @return {!(string|Uint8Array)} + */ +proto.cc.arduino.cli.debug.DebugReq.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes data = 2; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.cc.arduino.cli.debug.DebugReq.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.debug.DebugReq.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cc.arduino.cli.debug.DebugReq} returns this + */ +proto.cc.arduino.cli.debug.DebugReq.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional bool send_interrupt = 3; + * @return {boolean} + */ +proto.cc.arduino.cli.debug.DebugReq.prototype.getSendInterrupt = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cc.arduino.cli.debug.DebugReq} returns this + */ +proto.cc.arduino.cli.debug.DebugReq.prototype.setSendInterrupt = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.debug.DebugConfigReq.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.debug.DebugConfigReq.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.debug.DebugConfigReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.debug.DebugConfigReq.toObject = function(includeInstance, msg) { + var f, obj = { + instance: (f = msg.getInstance()) && commands_common_pb.Instance.toObject(includeInstance, f), + fqbn: jspb.Message.getFieldWithDefault(msg, 2, ""), + sketchPath: jspb.Message.getFieldWithDefault(msg, 3, ""), + port: jspb.Message.getFieldWithDefault(msg, 4, ""), + interpreter: jspb.Message.getFieldWithDefault(msg, 5, ""), + importFile: jspb.Message.getFieldWithDefault(msg, 7, ""), + importDir: jspb.Message.getFieldWithDefault(msg, 8, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cc.arduino.cli.debug.DebugConfigReq} + */ +proto.cc.arduino.cli.debug.DebugConfigReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.debug.DebugConfigReq; + return proto.cc.arduino.cli.debug.DebugConfigReq.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.debug.DebugConfigReq} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.debug.DebugConfigReq} + */ +proto.cc.arduino.cli.debug.DebugConfigReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new commands_common_pb.Instance; + reader.readMessage(value,commands_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 {string} */ (reader.readString()); + msg.setInterpreter(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setImportFile(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setImportDir(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.debug.DebugConfigReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.debug.DebugConfigReq.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cc.arduino.cli.debug.DebugConfigReq} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.debug.DebugConfigReq.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInstance(); + if (f != null) { + writer.writeMessage( + 1, + f, + commands_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.getInterpreter(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getImportFile(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } + f = message.getImportDir(); + if (f.length > 0) { + writer.writeString( + 8, + f + ); + } +}; + + +/** + * optional cc.arduino.cli.commands.Instance instance = 1; + * @return {?proto.cc.arduino.cli.commands.Instance} + */ +proto.cc.arduino.cli.debug.DebugConfigReq.prototype.getInstance = function() { + return /** @type{?proto.cc.arduino.cli.commands.Instance} */ ( + jspb.Message.getWrapperField(this, commands_common_pb.Instance, 1)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.Instance|undefined} value + * @return {!proto.cc.arduino.cli.debug.DebugConfigReq} returns this +*/ +proto.cc.arduino.cli.debug.DebugConfigReq.prototype.setInstance = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.debug.DebugConfigReq} returns this + */ +proto.cc.arduino.cli.debug.DebugConfigReq.prototype.clearInstance = function() { + return this.setInstance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.debug.DebugConfigReq.prototype.hasInstance = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string fqbn = 2; + * @return {string} + */ +proto.cc.arduino.cli.debug.DebugConfigReq.prototype.getFqbn = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.debug.DebugConfigReq} returns this + */ +proto.cc.arduino.cli.debug.DebugConfigReq.prototype.setFqbn = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string sketch_path = 3; + * @return {string} + */ +proto.cc.arduino.cli.debug.DebugConfigReq.prototype.getSketchPath = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.debug.DebugConfigReq} returns this + */ +proto.cc.arduino.cli.debug.DebugConfigReq.prototype.setSketchPath = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string port = 4; + * @return {string} + */ +proto.cc.arduino.cli.debug.DebugConfigReq.prototype.getPort = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.debug.DebugConfigReq} returns this + */ +proto.cc.arduino.cli.debug.DebugConfigReq.prototype.setPort = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string interpreter = 5; + * @return {string} + */ +proto.cc.arduino.cli.debug.DebugConfigReq.prototype.getInterpreter = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.debug.DebugConfigReq} returns this + */ +proto.cc.arduino.cli.debug.DebugConfigReq.prototype.setInterpreter = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional string import_file = 7; + * @return {string} + */ +proto.cc.arduino.cli.debug.DebugConfigReq.prototype.getImportFile = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.debug.DebugConfigReq} returns this + */ +proto.cc.arduino.cli.debug.DebugConfigReq.prototype.setImportFile = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + +/** + * optional string import_dir = 8; + * @return {string} + */ +proto.cc.arduino.cli.debug.DebugConfigReq.prototype.getImportDir = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.debug.DebugConfigReq} returns this + */ +proto.cc.arduino.cli.debug.DebugConfigReq.prototype.setImportDir = function(value) { + return jspb.Message.setProto3StringField(this, 8, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.debug.DebugResp.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.debug.DebugResp.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.debug.DebugResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.debug.DebugResp.toObject = function(includeInstance, msg) { + var f, obj = { + data: msg.getData_asB64(), + error: 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.cc.arduino.cli.debug.DebugResp} + */ +proto.cc.arduino.cli.debug.DebugResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.debug.DebugResp; + return proto.cc.arduino.cli.debug.DebugResp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.debug.DebugResp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.debug.DebugResp} + */ +proto.cc.arduino.cli.debug.DebugResp.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.setData(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setError(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.debug.DebugResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.debug.DebugResp.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cc.arduino.cli.debug.DebugResp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.debug.DebugResp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getError(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional bytes data = 1; + * @return {!(string|Uint8Array)} + */ +proto.cc.arduino.cli.debug.DebugResp.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes data = 1; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.cc.arduino.cli.debug.DebugResp.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.debug.DebugResp.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cc.arduino.cli.debug.DebugResp} returns this + */ +proto.cc.arduino.cli.debug.DebugResp.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional string error = 2; + * @return {string} + */ +proto.cc.arduino.cli.debug.DebugResp.prototype.getError = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.debug.DebugResp} returns this + */ +proto.cc.arduino.cli.debug.DebugResp.prototype.setError = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +goog.object.extend(exports, proto.cc.arduino.cli.debug); diff --git a/arduino-ide-extension/src/node/cli-protocol/monitor/monitor_grpc_pb.d.ts b/arduino-ide-extension/src/node/cli-protocol/monitor/monitor_grpc_pb.d.ts new file mode 100644 index 00000000..983fb933 --- /dev/null +++ b/arduino-ide-extension/src/node/cli-protocol/monitor/monitor_grpc_pb.d.ts @@ -0,0 +1,42 @@ +// package: cc.arduino.cli.monitor +// file: monitor/monitor.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as grpc from "@grpc/grpc-js"; +import {handleClientStreamingCall} from "@grpc/grpc-js/build/src/server-call"; +import * as monitor_monitor_pb from "../monitor/monitor_pb"; +import * as google_protobuf_struct_pb from "google-protobuf/google/protobuf/struct_pb"; + +interface IMonitorService extends grpc.ServiceDefinition { + streamingOpen: IMonitorService_IStreamingOpen; +} + +interface IMonitorService_IStreamingOpen extends grpc.MethodDefinition { + path: string; // "/cc.arduino.cli.monitor.Monitor/StreamingOpen" + requestStream: true; + responseStream: true; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} + +export const MonitorService: IMonitorService; + +export interface IMonitorServer { + streamingOpen: grpc.handleBidiStreamingCall; +} + +export interface IMonitorClient { + streamingOpen(): grpc.ClientDuplexStream; + streamingOpen(options: Partial): grpc.ClientDuplexStream; + streamingOpen(metadata: grpc.Metadata, options?: Partial): grpc.ClientDuplexStream; +} + +export class MonitorClient extends grpc.Client implements IMonitorClient { + constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); + public streamingOpen(options?: Partial): grpc.ClientDuplexStream; + public streamingOpen(metadata?: grpc.Metadata, options?: Partial): grpc.ClientDuplexStream; +} diff --git a/arduino-ide-extension/src/node/cli-protocol/monitor/monitor_grpc_pb.js b/arduino-ide-extension/src/node/cli-protocol/monitor/monitor_grpc_pb.js new file mode 100644 index 00000000..d646ec33 --- /dev/null +++ b/arduino-ide-extension/src/node/cli-protocol/monitor/monitor_grpc_pb.js @@ -0,0 +1,62 @@ +// GENERATED CODE -- DO NOT EDIT! + +// Original file comments: +// This file is part of arduino-cli. +// +// Copyright 2020 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 monitor_monitor_pb = require('../monitor/monitor_pb.js'); +var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js'); + +function serialize_cc_arduino_cli_monitor_StreamingOpenReq(arg) { + if (!(arg instanceof monitor_monitor_pb.StreamingOpenReq)) { + throw new Error('Expected argument of type cc.arduino.cli.monitor.StreamingOpenReq'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_monitor_StreamingOpenReq(buffer_arg) { + return monitor_monitor_pb.StreamingOpenReq.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_monitor_StreamingOpenResp(arg) { + if (!(arg instanceof monitor_monitor_pb.StreamingOpenResp)) { + throw new Error('Expected argument of type cc.arduino.cli.monitor.StreamingOpenResp'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_monitor_StreamingOpenResp(buffer_arg) { + return monitor_monitor_pb.StreamingOpenResp.deserializeBinary(new Uint8Array(buffer_arg)); +} + + +// Service that abstract a Monitor usage +var MonitorService = exports['cc.arduino.cli.monitor.Monitor'] = { + // Open a bidirectional monitor stream. This can be used to implement +// something similar to the Arduino IDE's Serial Monitor. +streamingOpen: { + path: '/cc.arduino.cli.monitor.Monitor/StreamingOpen', + requestStream: true, + responseStream: true, + requestType: monitor_monitor_pb.StreamingOpenReq, + responseType: monitor_monitor_pb.StreamingOpenResp, + requestSerialize: serialize_cc_arduino_cli_monitor_StreamingOpenReq, + requestDeserialize: deserialize_cc_arduino_cli_monitor_StreamingOpenReq, + responseSerialize: serialize_cc_arduino_cli_monitor_StreamingOpenResp, + responseDeserialize: deserialize_cc_arduino_cli_monitor_StreamingOpenResp, + }, +}; + diff --git a/arduino-ide-extension/src/node/cli-protocol/monitor/monitor_pb.d.ts b/arduino-ide-extension/src/node/cli-protocol/monitor/monitor_pb.d.ts new file mode 100644 index 00000000..d80a5215 --- /dev/null +++ b/arduino-ide-extension/src/node/cli-protocol/monitor/monitor_pb.d.ts @@ -0,0 +1,113 @@ +// package: cc.arduino.cli.monitor +// file: monitor/monitor.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; +import * as google_protobuf_struct_pb from "google-protobuf/google/protobuf/struct_pb"; + +export class StreamingOpenReq extends jspb.Message { + + hasMonitorconfig(): boolean; + clearMonitorconfig(): void; + getMonitorconfig(): MonitorConfig | undefined; + setMonitorconfig(value?: MonitorConfig): StreamingOpenReq; + + + hasData(): boolean; + clearData(): void; + getData(): Uint8Array | string; + getData_asU8(): Uint8Array; + getData_asB64(): string; + setData(value: Uint8Array | string): StreamingOpenReq; + + + getContentCase(): StreamingOpenReq.ContentCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): StreamingOpenReq.AsObject; + static toObject(includeInstance: boolean, msg: StreamingOpenReq): StreamingOpenReq.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: StreamingOpenReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): StreamingOpenReq; + static deserializeBinaryFromReader(message: StreamingOpenReq, reader: jspb.BinaryReader): StreamingOpenReq; +} + +export namespace StreamingOpenReq { + export type AsObject = { + monitorconfig?: MonitorConfig.AsObject, + data: Uint8Array | string, + } + + export enum ContentCase { + CONTENT_NOT_SET = 0, + + MONITORCONFIG = 1, + + DATA = 2, + + } + +} + +export class MonitorConfig extends jspb.Message { + getTarget(): string; + setTarget(value: string): MonitorConfig; + + getType(): MonitorConfig.TargetType; + setType(value: MonitorConfig.TargetType): MonitorConfig; + + + hasAdditionalconfig(): boolean; + clearAdditionalconfig(): void; + getAdditionalconfig(): google_protobuf_struct_pb.Struct | undefined; + setAdditionalconfig(value?: google_protobuf_struct_pb.Struct): MonitorConfig; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MonitorConfig.AsObject; + static toObject(includeInstance: boolean, msg: MonitorConfig): MonitorConfig.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MonitorConfig, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MonitorConfig; + static deserializeBinaryFromReader(message: MonitorConfig, reader: jspb.BinaryReader): MonitorConfig; +} + +export namespace MonitorConfig { + export type AsObject = { + target: string, + type: MonitorConfig.TargetType, + additionalconfig?: google_protobuf_struct_pb.Struct.AsObject, + } + + export enum TargetType { + SERIAL = 0, + } + +} + +export class StreamingOpenResp extends jspb.Message { + getData(): Uint8Array | string; + getData_asU8(): Uint8Array; + getData_asB64(): string; + setData(value: Uint8Array | string): StreamingOpenResp; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): StreamingOpenResp.AsObject; + static toObject(includeInstance: boolean, msg: StreamingOpenResp): StreamingOpenResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: StreamingOpenResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): StreamingOpenResp; + static deserializeBinaryFromReader(message: StreamingOpenResp, reader: jspb.BinaryReader): StreamingOpenResp; +} + +export namespace StreamingOpenResp { + export type AsObject = { + data: Uint8Array | string, + } +} diff --git a/arduino-ide-extension/src/node/cli-protocol/monitor/monitor_pb.js b/arduino-ide-extension/src/node/cli-protocol/monitor/monitor_pb.js new file mode 100644 index 00000000..b9636c3a --- /dev/null +++ b/arduino-ide-extension/src/node/cli-protocol/monitor/monitor_pb.js @@ -0,0 +1,706 @@ +// source: monitor/monitor.proto +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js'); +goog.object.extend(proto, google_protobuf_struct_pb); +goog.exportSymbol('proto.cc.arduino.cli.monitor.MonitorConfig', null, global); +goog.exportSymbol('proto.cc.arduino.cli.monitor.MonitorConfig.TargetType', null, global); +goog.exportSymbol('proto.cc.arduino.cli.monitor.StreamingOpenReq', null, global); +goog.exportSymbol('proto.cc.arduino.cli.monitor.StreamingOpenReq.ContentCase', null, global); +goog.exportSymbol('proto.cc.arduino.cli.monitor.StreamingOpenResp', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.monitor.StreamingOpenReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.cc.arduino.cli.monitor.StreamingOpenReq.oneofGroups_); +}; +goog.inherits(proto.cc.arduino.cli.monitor.StreamingOpenReq, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.monitor.StreamingOpenReq.displayName = 'proto.cc.arduino.cli.monitor.StreamingOpenReq'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.monitor.MonitorConfig = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.monitor.MonitorConfig, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.monitor.MonitorConfig.displayName = 'proto.cc.arduino.cli.monitor.MonitorConfig'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.monitor.StreamingOpenResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.monitor.StreamingOpenResp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.monitor.StreamingOpenResp.displayName = 'proto.cc.arduino.cli.monitor.StreamingOpenResp'; +} + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.cc.arduino.cli.monitor.StreamingOpenReq.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.cc.arduino.cli.monitor.StreamingOpenReq.ContentCase = { + CONTENT_NOT_SET: 0, + MONITORCONFIG: 1, + DATA: 2 +}; + +/** + * @return {proto.cc.arduino.cli.monitor.StreamingOpenReq.ContentCase} + */ +proto.cc.arduino.cli.monitor.StreamingOpenReq.prototype.getContentCase = function() { + return /** @type {proto.cc.arduino.cli.monitor.StreamingOpenReq.ContentCase} */(jspb.Message.computeOneofCase(this, proto.cc.arduino.cli.monitor.StreamingOpenReq.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.monitor.StreamingOpenReq.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.monitor.StreamingOpenReq.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.monitor.StreamingOpenReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.monitor.StreamingOpenReq.toObject = function(includeInstance, msg) { + var f, obj = { + monitorconfig: (f = msg.getMonitorconfig()) && proto.cc.arduino.cli.monitor.MonitorConfig.toObject(includeInstance, f), + data: msg.getData_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.cc.arduino.cli.monitor.StreamingOpenReq} + */ +proto.cc.arduino.cli.monitor.StreamingOpenReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.monitor.StreamingOpenReq; + return proto.cc.arduino.cli.monitor.StreamingOpenReq.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.monitor.StreamingOpenReq} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.monitor.StreamingOpenReq} + */ +proto.cc.arduino.cli.monitor.StreamingOpenReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cc.arduino.cli.monitor.MonitorConfig; + reader.readMessage(value,proto.cc.arduino.cli.monitor.MonitorConfig.deserializeBinaryFromReader); + msg.setMonitorconfig(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.monitor.StreamingOpenReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.monitor.StreamingOpenReq.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cc.arduino.cli.monitor.StreamingOpenReq} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.monitor.StreamingOpenReq.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMonitorconfig(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.cc.arduino.cli.monitor.MonitorConfig.serializeBinaryToWriter + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional MonitorConfig monitorConfig = 1; + * @return {?proto.cc.arduino.cli.monitor.MonitorConfig} + */ +proto.cc.arduino.cli.monitor.StreamingOpenReq.prototype.getMonitorconfig = function() { + return /** @type{?proto.cc.arduino.cli.monitor.MonitorConfig} */ ( + jspb.Message.getWrapperField(this, proto.cc.arduino.cli.monitor.MonitorConfig, 1)); +}; + + +/** + * @param {?proto.cc.arduino.cli.monitor.MonitorConfig|undefined} value + * @return {!proto.cc.arduino.cli.monitor.StreamingOpenReq} returns this +*/ +proto.cc.arduino.cli.monitor.StreamingOpenReq.prototype.setMonitorconfig = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.cc.arduino.cli.monitor.StreamingOpenReq.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.monitor.StreamingOpenReq} returns this + */ +proto.cc.arduino.cli.monitor.StreamingOpenReq.prototype.clearMonitorconfig = function() { + return this.setMonitorconfig(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.monitor.StreamingOpenReq.prototype.hasMonitorconfig = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bytes data = 2; + * @return {!(string|Uint8Array)} + */ +proto.cc.arduino.cli.monitor.StreamingOpenReq.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes data = 2; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.cc.arduino.cli.monitor.StreamingOpenReq.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.monitor.StreamingOpenReq.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cc.arduino.cli.monitor.StreamingOpenReq} returns this + */ +proto.cc.arduino.cli.monitor.StreamingOpenReq.prototype.setData = function(value) { + return jspb.Message.setOneofField(this, 2, proto.cc.arduino.cli.monitor.StreamingOpenReq.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cc.arduino.cli.monitor.StreamingOpenReq} returns this + */ +proto.cc.arduino.cli.monitor.StreamingOpenReq.prototype.clearData = function() { + return jspb.Message.setOneofField(this, 2, proto.cc.arduino.cli.monitor.StreamingOpenReq.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.monitor.StreamingOpenReq.prototype.hasData = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.monitor.MonitorConfig.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.monitor.MonitorConfig.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.monitor.MonitorConfig} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.monitor.MonitorConfig.toObject = function(includeInstance, msg) { + var f, obj = { + target: jspb.Message.getFieldWithDefault(msg, 1, ""), + type: jspb.Message.getFieldWithDefault(msg, 2, 0), + additionalconfig: (f = msg.getAdditionalconfig()) && google_protobuf_struct_pb.Struct.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.cc.arduino.cli.monitor.MonitorConfig} + */ +proto.cc.arduino.cli.monitor.MonitorConfig.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.monitor.MonitorConfig; + return proto.cc.arduino.cli.monitor.MonitorConfig.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.monitor.MonitorConfig} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.monitor.MonitorConfig} + */ +proto.cc.arduino.cli.monitor.MonitorConfig.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.setTarget(value); + break; + case 2: + var value = /** @type {!proto.cc.arduino.cli.monitor.MonitorConfig.TargetType} */ (reader.readEnum()); + msg.setType(value); + break; + case 3: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setAdditionalconfig(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.monitor.MonitorConfig.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.monitor.MonitorConfig.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cc.arduino.cli.monitor.MonitorConfig} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.monitor.MonitorConfig.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTarget(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getType(); + if (f !== 0.0) { + writer.writeEnum( + 2, + f + ); + } + f = message.getAdditionalconfig(); + if (f != null) { + writer.writeMessage( + 3, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } +}; + + +/** + * @enum {number} + */ +proto.cc.arduino.cli.monitor.MonitorConfig.TargetType = { + SERIAL: 0 +}; + +/** + * optional string target = 1; + * @return {string} + */ +proto.cc.arduino.cli.monitor.MonitorConfig.prototype.getTarget = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.monitor.MonitorConfig} returns this + */ +proto.cc.arduino.cli.monitor.MonitorConfig.prototype.setTarget = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional TargetType type = 2; + * @return {!proto.cc.arduino.cli.monitor.MonitorConfig.TargetType} + */ +proto.cc.arduino.cli.monitor.MonitorConfig.prototype.getType = function() { + return /** @type {!proto.cc.arduino.cli.monitor.MonitorConfig.TargetType} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {!proto.cc.arduino.cli.monitor.MonitorConfig.TargetType} value + * @return {!proto.cc.arduino.cli.monitor.MonitorConfig} returns this + */ +proto.cc.arduino.cli.monitor.MonitorConfig.prototype.setType = function(value) { + return jspb.Message.setProto3EnumField(this, 2, value); +}; + + +/** + * optional google.protobuf.Struct additionalConfig = 3; + * @return {?proto.google.protobuf.Struct} + */ +proto.cc.arduino.cli.monitor.MonitorConfig.prototype.getAdditionalconfig = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 3)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.cc.arduino.cli.monitor.MonitorConfig} returns this +*/ +proto.cc.arduino.cli.monitor.MonitorConfig.prototype.setAdditionalconfig = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.monitor.MonitorConfig} returns this + */ +proto.cc.arduino.cli.monitor.MonitorConfig.prototype.clearAdditionalconfig = function() { + return this.setAdditionalconfig(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.monitor.MonitorConfig.prototype.hasAdditionalconfig = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.monitor.StreamingOpenResp.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.monitor.StreamingOpenResp.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.monitor.StreamingOpenResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.monitor.StreamingOpenResp.toObject = function(includeInstance, msg) { + var f, obj = { + data: msg.getData_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.cc.arduino.cli.monitor.StreamingOpenResp} + */ +proto.cc.arduino.cli.monitor.StreamingOpenResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.monitor.StreamingOpenResp; + return proto.cc.arduino.cli.monitor.StreamingOpenResp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.monitor.StreamingOpenResp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.monitor.StreamingOpenResp} + */ +proto.cc.arduino.cli.monitor.StreamingOpenResp.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.setData(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.monitor.StreamingOpenResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.monitor.StreamingOpenResp.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cc.arduino.cli.monitor.StreamingOpenResp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.monitor.StreamingOpenResp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes data = 1; + * @return {!(string|Uint8Array)} + */ +proto.cc.arduino.cli.monitor.StreamingOpenResp.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes data = 1; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.cc.arduino.cli.monitor.StreamingOpenResp.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.monitor.StreamingOpenResp.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cc.arduino.cli.monitor.StreamingOpenResp} returns this + */ +proto.cc.arduino.cli.monitor.StreamingOpenResp.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +goog.object.extend(exports, proto.cc.arduino.cli.monitor); diff --git a/arduino-ide-extension/src/node/cli-protocol/settings/settings_grpc_pb.d.ts b/arduino-ide-extension/src/node/cli-protocol/settings/settings_grpc_pb.d.ts new file mode 100644 index 00000000..e94bf648 --- /dev/null +++ b/arduino-ide-extension/src/node/cli-protocol/settings/settings_grpc_pb.d.ts @@ -0,0 +1,93 @@ +// package: cc.arduino.cli.settings +// file: settings/settings.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as grpc from "@grpc/grpc-js"; +import {handleClientStreamingCall} from "@grpc/grpc-js/build/src/server-call"; +import * as settings_settings_pb from "../settings/settings_pb"; + +interface ISettingsService extends grpc.ServiceDefinition { + getAll: ISettingsService_IGetAll; + merge: ISettingsService_IMerge; + getValue: ISettingsService_IGetValue; + setValue: ISettingsService_ISetValue; +} + +interface ISettingsService_IGetAll extends grpc.MethodDefinition { + path: string; // "/cc.arduino.cli.settings.Settings/GetAll" + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface ISettingsService_IMerge extends grpc.MethodDefinition { + path: string; // "/cc.arduino.cli.settings.Settings/Merge" + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface ISettingsService_IGetValue extends grpc.MethodDefinition { + path: string; // "/cc.arduino.cli.settings.Settings/GetValue" + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface ISettingsService_ISetValue extends grpc.MethodDefinition { + path: string; // "/cc.arduino.cli.settings.Settings/SetValue" + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} + +export const SettingsService: ISettingsService; + +export interface ISettingsServer { + getAll: grpc.handleUnaryCall; + merge: grpc.handleUnaryCall; + getValue: grpc.handleUnaryCall; + setValue: grpc.handleUnaryCall; +} + +export interface ISettingsClient { + getAll(request: settings_settings_pb.GetAllRequest, callback: (error: grpc.ServiceError | null, response: settings_settings_pb.RawData) => void): grpc.ClientUnaryCall; + getAll(request: settings_settings_pb.GetAllRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: settings_settings_pb.RawData) => void): grpc.ClientUnaryCall; + getAll(request: settings_settings_pb.GetAllRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: settings_settings_pb.RawData) => void): grpc.ClientUnaryCall; + merge(request: settings_settings_pb.RawData, callback: (error: grpc.ServiceError | null, response: settings_settings_pb.MergeResponse) => void): grpc.ClientUnaryCall; + merge(request: settings_settings_pb.RawData, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: settings_settings_pb.MergeResponse) => void): grpc.ClientUnaryCall; + merge(request: settings_settings_pb.RawData, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: settings_settings_pb.MergeResponse) => void): grpc.ClientUnaryCall; + getValue(request: settings_settings_pb.GetValueRequest, callback: (error: grpc.ServiceError | null, response: settings_settings_pb.Value) => void): grpc.ClientUnaryCall; + getValue(request: settings_settings_pb.GetValueRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: settings_settings_pb.Value) => void): grpc.ClientUnaryCall; + getValue(request: settings_settings_pb.GetValueRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: settings_settings_pb.Value) => void): grpc.ClientUnaryCall; + setValue(request: settings_settings_pb.Value, callback: (error: grpc.ServiceError | null, response: settings_settings_pb.SetValueResponse) => void): grpc.ClientUnaryCall; + setValue(request: settings_settings_pb.Value, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: settings_settings_pb.SetValueResponse) => void): grpc.ClientUnaryCall; + setValue(request: settings_settings_pb.Value, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: settings_settings_pb.SetValueResponse) => void): grpc.ClientUnaryCall; +} + +export class SettingsClient extends grpc.Client implements ISettingsClient { + constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); + public getAll(request: settings_settings_pb.GetAllRequest, callback: (error: grpc.ServiceError | null, response: settings_settings_pb.RawData) => void): grpc.ClientUnaryCall; + public getAll(request: settings_settings_pb.GetAllRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: settings_settings_pb.RawData) => void): grpc.ClientUnaryCall; + public getAll(request: settings_settings_pb.GetAllRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: settings_settings_pb.RawData) => void): grpc.ClientUnaryCall; + public merge(request: settings_settings_pb.RawData, callback: (error: grpc.ServiceError | null, response: settings_settings_pb.MergeResponse) => void): grpc.ClientUnaryCall; + public merge(request: settings_settings_pb.RawData, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: settings_settings_pb.MergeResponse) => void): grpc.ClientUnaryCall; + public merge(request: settings_settings_pb.RawData, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: settings_settings_pb.MergeResponse) => void): grpc.ClientUnaryCall; + public getValue(request: settings_settings_pb.GetValueRequest, callback: (error: grpc.ServiceError | null, response: settings_settings_pb.Value) => void): grpc.ClientUnaryCall; + public getValue(request: settings_settings_pb.GetValueRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: settings_settings_pb.Value) => void): grpc.ClientUnaryCall; + public getValue(request: settings_settings_pb.GetValueRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: settings_settings_pb.Value) => void): grpc.ClientUnaryCall; + public setValue(request: settings_settings_pb.Value, callback: (error: grpc.ServiceError | null, response: settings_settings_pb.SetValueResponse) => void): grpc.ClientUnaryCall; + public setValue(request: settings_settings_pb.Value, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: settings_settings_pb.SetValueResponse) => void): grpc.ClientUnaryCall; + public setValue(request: settings_settings_pb.Value, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: settings_settings_pb.SetValueResponse) => void): grpc.ClientUnaryCall; +} diff --git a/arduino-ide-extension/src/node/cli-protocol/settings/settings_grpc_pb.js b/arduino-ide-extension/src/node/cli-protocol/settings/settings_grpc_pb.js new file mode 100644 index 00000000..65199769 --- /dev/null +++ b/arduino-ide-extension/src/node/cli-protocol/settings/settings_grpc_pb.js @@ -0,0 +1,141 @@ +// GENERATED CODE -- DO NOT EDIT! + +// Original file comments: +// This file is part of arduino-cli. +// +// Copyright 2020 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 settings_settings_pb = require('../settings/settings_pb.js'); + +function serialize_cc_arduino_cli_settings_GetAllRequest(arg) { + if (!(arg instanceof settings_settings_pb.GetAllRequest)) { + throw new Error('Expected argument of type cc.arduino.cli.settings.GetAllRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_settings_GetAllRequest(buffer_arg) { + return settings_settings_pb.GetAllRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_settings_GetValueRequest(arg) { + if (!(arg instanceof settings_settings_pb.GetValueRequest)) { + throw new Error('Expected argument of type cc.arduino.cli.settings.GetValueRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_settings_GetValueRequest(buffer_arg) { + return settings_settings_pb.GetValueRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_settings_MergeResponse(arg) { + if (!(arg instanceof settings_settings_pb.MergeResponse)) { + throw new Error('Expected argument of type cc.arduino.cli.settings.MergeResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_settings_MergeResponse(buffer_arg) { + return settings_settings_pb.MergeResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_settings_RawData(arg) { + if (!(arg instanceof settings_settings_pb.RawData)) { + throw new Error('Expected argument of type cc.arduino.cli.settings.RawData'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_settings_RawData(buffer_arg) { + return settings_settings_pb.RawData.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_settings_SetValueResponse(arg) { + if (!(arg instanceof settings_settings_pb.SetValueResponse)) { + throw new Error('Expected argument of type cc.arduino.cli.settings.SetValueResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_settings_SetValueResponse(buffer_arg) { + return settings_settings_pb.SetValueResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_settings_Value(arg) { + if (!(arg instanceof settings_settings_pb.Value)) { + throw new Error('Expected argument of type cc.arduino.cli.settings.Value'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_settings_Value(buffer_arg) { + return settings_settings_pb.Value.deserializeBinary(new Uint8Array(buffer_arg)); +} + + +// The Settings service provides an interface to Arduino CLI's configuration +// options +var SettingsService = exports['cc.arduino.cli.settings.Settings'] = { + // List all the settings. +getAll: { + path: '/cc.arduino.cli.settings.Settings/GetAll', + requestStream: false, + responseStream: false, + requestType: settings_settings_pb.GetAllRequest, + responseType: settings_settings_pb.RawData, + requestSerialize: serialize_cc_arduino_cli_settings_GetAllRequest, + requestDeserialize: deserialize_cc_arduino_cli_settings_GetAllRequest, + responseSerialize: serialize_cc_arduino_cli_settings_RawData, + responseDeserialize: deserialize_cc_arduino_cli_settings_RawData, + }, + // Set multiple settings values at once. +merge: { + path: '/cc.arduino.cli.settings.Settings/Merge', + requestStream: false, + responseStream: false, + requestType: settings_settings_pb.RawData, + responseType: settings_settings_pb.MergeResponse, + requestSerialize: serialize_cc_arduino_cli_settings_RawData, + requestDeserialize: deserialize_cc_arduino_cli_settings_RawData, + responseSerialize: serialize_cc_arduino_cli_settings_MergeResponse, + responseDeserialize: deserialize_cc_arduino_cli_settings_MergeResponse, + }, + // Get the value of a specific setting. +getValue: { + path: '/cc.arduino.cli.settings.Settings/GetValue', + requestStream: false, + responseStream: false, + requestType: settings_settings_pb.GetValueRequest, + responseType: settings_settings_pb.Value, + requestSerialize: serialize_cc_arduino_cli_settings_GetValueRequest, + requestDeserialize: deserialize_cc_arduino_cli_settings_GetValueRequest, + responseSerialize: serialize_cc_arduino_cli_settings_Value, + responseDeserialize: deserialize_cc_arduino_cli_settings_Value, + }, + // Set the value of a specific setting. +setValue: { + path: '/cc.arduino.cli.settings.Settings/SetValue', + requestStream: false, + responseStream: false, + requestType: settings_settings_pb.Value, + responseType: settings_settings_pb.SetValueResponse, + requestSerialize: serialize_cc_arduino_cli_settings_Value, + requestDeserialize: deserialize_cc_arduino_cli_settings_Value, + responseSerialize: serialize_cc_arduino_cli_settings_SetValueResponse, + responseDeserialize: deserialize_cc_arduino_cli_settings_SetValueResponse, + }, +}; + diff --git a/arduino-ide-extension/src/node/cli-protocol/settings/settings_pb.d.ts b/arduino-ide-extension/src/node/cli-protocol/settings/settings_pb.d.ts new file mode 100644 index 00000000..47b46077 --- /dev/null +++ b/arduino-ide-extension/src/node/cli-protocol/settings/settings_pb.d.ts @@ -0,0 +1,125 @@ +// package: cc.arduino.cli.settings +// file: settings/settings.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; + +export class RawData extends jspb.Message { + getJsondata(): string; + setJsondata(value: string): RawData; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RawData.AsObject; + static toObject(includeInstance: boolean, msg: RawData): RawData.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RawData, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RawData; + static deserializeBinaryFromReader(message: RawData, reader: jspb.BinaryReader): RawData; +} + +export namespace RawData { + export type AsObject = { + jsondata: string, + } +} + +export class Value extends jspb.Message { + getKey(): string; + setKey(value: string): Value; + + getJsondata(): string; + setJsondata(value: string): Value; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Value.AsObject; + static toObject(includeInstance: boolean, msg: Value): Value.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Value, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Value; + static deserializeBinaryFromReader(message: Value, reader: jspb.BinaryReader): Value; +} + +export namespace Value { + export type AsObject = { + key: string, + jsondata: string, + } +} + +export class GetAllRequest extends jspb.Message { + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetAllRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetAllRequest): GetAllRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetAllRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetAllRequest; + static deserializeBinaryFromReader(message: GetAllRequest, reader: jspb.BinaryReader): GetAllRequest; +} + +export namespace GetAllRequest { + export type AsObject = { + } +} + +export class GetValueRequest extends jspb.Message { + getKey(): string; + setKey(value: string): GetValueRequest; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetValueRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetValueRequest): GetValueRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetValueRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetValueRequest; + static deserializeBinaryFromReader(message: GetValueRequest, reader: jspb.BinaryReader): GetValueRequest; +} + +export namespace GetValueRequest { + export type AsObject = { + key: string, + } +} + +export class MergeResponse extends jspb.Message { + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MergeResponse.AsObject; + static toObject(includeInstance: boolean, msg: MergeResponse): MergeResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MergeResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MergeResponse; + static deserializeBinaryFromReader(message: MergeResponse, reader: jspb.BinaryReader): MergeResponse; +} + +export namespace MergeResponse { + export type AsObject = { + } +} + +export class SetValueResponse extends jspb.Message { + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SetValueResponse.AsObject; + static toObject(includeInstance: boolean, msg: SetValueResponse): SetValueResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SetValueResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SetValueResponse; + static deserializeBinaryFromReader(message: SetValueResponse, reader: jspb.BinaryReader): SetValueResponse; +} + +export namespace SetValueResponse { + export type AsObject = { + } +} diff --git a/arduino-ide-extension/src/node/cli-protocol/settings/settings_pb.js b/arduino-ide-extension/src/node/cli-protocol/settings/settings_pb.js new file mode 100644 index 00000000..1d7ec299 --- /dev/null +++ b/arduino-ide-extension/src/node/cli-protocol/settings/settings_pb.js @@ -0,0 +1,870 @@ +// source: settings/settings.proto +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +goog.exportSymbol('proto.cc.arduino.cli.settings.GetAllRequest', null, global); +goog.exportSymbol('proto.cc.arduino.cli.settings.GetValueRequest', null, global); +goog.exportSymbol('proto.cc.arduino.cli.settings.MergeResponse', null, global); +goog.exportSymbol('proto.cc.arduino.cli.settings.RawData', null, global); +goog.exportSymbol('proto.cc.arduino.cli.settings.SetValueResponse', null, global); +goog.exportSymbol('proto.cc.arduino.cli.settings.Value', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.settings.RawData = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.settings.RawData, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.settings.RawData.displayName = 'proto.cc.arduino.cli.settings.RawData'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.settings.Value = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.settings.Value, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.settings.Value.displayName = 'proto.cc.arduino.cli.settings.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.cc.arduino.cli.settings.GetAllRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.settings.GetAllRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.settings.GetAllRequest.displayName = 'proto.cc.arduino.cli.settings.GetAllRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.settings.GetValueRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.settings.GetValueRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.settings.GetValueRequest.displayName = 'proto.cc.arduino.cli.settings.GetValueRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.settings.MergeResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.settings.MergeResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.settings.MergeResponse.displayName = 'proto.cc.arduino.cli.settings.MergeResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.settings.SetValueResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.settings.SetValueResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.settings.SetValueResponse.displayName = 'proto.cc.arduino.cli.settings.SetValueResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.settings.RawData.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.settings.RawData.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.settings.RawData} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.settings.RawData.toObject = function(includeInstance, msg) { + var f, obj = { + jsondata: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cc.arduino.cli.settings.RawData} + */ +proto.cc.arduino.cli.settings.RawData.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.settings.RawData; + return proto.cc.arduino.cli.settings.RawData.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.settings.RawData} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.settings.RawData} + */ +proto.cc.arduino.cli.settings.RawData.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.setJsondata(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.settings.RawData.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.settings.RawData.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cc.arduino.cli.settings.RawData} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.settings.RawData.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getJsondata(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string jsonData = 1; + * @return {string} + */ +proto.cc.arduino.cli.settings.RawData.prototype.getJsondata = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.settings.RawData} returns this + */ +proto.cc.arduino.cli.settings.RawData.prototype.setJsondata = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.settings.Value.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.settings.Value.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.settings.Value} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.settings.Value.toObject = function(includeInstance, msg) { + var f, obj = { + key: jspb.Message.getFieldWithDefault(msg, 1, ""), + jsondata: 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.cc.arduino.cli.settings.Value} + */ +proto.cc.arduino.cli.settings.Value.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.settings.Value; + return proto.cc.arduino.cli.settings.Value.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.settings.Value} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.settings.Value} + */ +proto.cc.arduino.cli.settings.Value.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.setKey(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setJsondata(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.settings.Value.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.settings.Value.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cc.arduino.cli.settings.Value} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.settings.Value.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKey(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getJsondata(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string key = 1; + * @return {string} + */ +proto.cc.arduino.cli.settings.Value.prototype.getKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.settings.Value} returns this + */ +proto.cc.arduino.cli.settings.Value.prototype.setKey = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string jsonData = 2; + * @return {string} + */ +proto.cc.arduino.cli.settings.Value.prototype.getJsondata = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.settings.Value} returns this + */ +proto.cc.arduino.cli.settings.Value.prototype.setJsondata = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.settings.GetAllRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.settings.GetAllRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.settings.GetAllRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.settings.GetAllRequest.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.cc.arduino.cli.settings.GetAllRequest} + */ +proto.cc.arduino.cli.settings.GetAllRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.settings.GetAllRequest; + return proto.cc.arduino.cli.settings.GetAllRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.settings.GetAllRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.settings.GetAllRequest} + */ +proto.cc.arduino.cli.settings.GetAllRequest.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.cc.arduino.cli.settings.GetAllRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.settings.GetAllRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cc.arduino.cli.settings.GetAllRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.settings.GetAllRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.settings.GetValueRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.settings.GetValueRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.settings.GetValueRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.settings.GetValueRequest.toObject = function(includeInstance, msg) { + var f, obj = { + key: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cc.arduino.cli.settings.GetValueRequest} + */ +proto.cc.arduino.cli.settings.GetValueRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.settings.GetValueRequest; + return proto.cc.arduino.cli.settings.GetValueRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.settings.GetValueRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.settings.GetValueRequest} + */ +proto.cc.arduino.cli.settings.GetValueRequest.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.setKey(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.settings.GetValueRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.settings.GetValueRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cc.arduino.cli.settings.GetValueRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.settings.GetValueRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKey(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string key = 1; + * @return {string} + */ +proto.cc.arduino.cli.settings.GetValueRequest.prototype.getKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.settings.GetValueRequest} returns this + */ +proto.cc.arduino.cli.settings.GetValueRequest.prototype.setKey = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.settings.MergeResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.settings.MergeResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.settings.MergeResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.settings.MergeResponse.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.cc.arduino.cli.settings.MergeResponse} + */ +proto.cc.arduino.cli.settings.MergeResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.settings.MergeResponse; + return proto.cc.arduino.cli.settings.MergeResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.settings.MergeResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.settings.MergeResponse} + */ +proto.cc.arduino.cli.settings.MergeResponse.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.cc.arduino.cli.settings.MergeResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.settings.MergeResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cc.arduino.cli.settings.MergeResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.settings.MergeResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.settings.SetValueResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.settings.SetValueResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.settings.SetValueResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.settings.SetValueResponse.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.cc.arduino.cli.settings.SetValueResponse} + */ +proto.cc.arduino.cli.settings.SetValueResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.settings.SetValueResponse; + return proto.cc.arduino.cli.settings.SetValueResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.settings.SetValueResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.settings.SetValueResponse} + */ +proto.cc.arduino.cli.settings.SetValueResponse.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.cc.arduino.cli.settings.SetValueResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.settings.SetValueResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cc.arduino.cli.settings.SetValueResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.settings.SetValueResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + +goog.object.extend(exports, proto.cc.arduino.cli.settings); diff --git a/arduino-ide-extension/src/node/config-service-impl.ts b/arduino-ide-extension/src/node/config-service-impl.ts index d0250d90..a09b350e 100644 --- a/arduino-ide-extension/src/node/config-service-impl.ts +++ b/arduino-ide-extension/src/node/config-service-impl.ts @@ -1,6 +1,6 @@ import * as path from 'path'; import * as yaml from 'js-yaml'; -import * as grpc from 'grpc'; +import * as grpc from '@grpc/grpc-js'; import * as deepmerge from 'deepmerge'; import { injectable, inject, named } from 'inversify'; import URI from '@theia/core/lib/common/uri'; diff --git a/arduino-ide-extension/src/node/core-client-provider.ts b/arduino-ide-extension/src/node/core-client-provider.ts index 1d325dcf..e14d9ce7 100644 --- a/arduino-ide-extension/src/node/core-client-provider.ts +++ b/arduino-ide-extension/src/node/core-client-provider.ts @@ -1,8 +1,9 @@ -import * as grpc from 'grpc'; +import * as grpc from '@grpc/grpc-js'; import { inject, injectable } from 'inversify'; import { ToolOutputServiceServer } from '../common/protocol'; import { GrpcClientProvider } from './grpc-client-provider'; import { ArduinoCoreClient } from './cli-protocol/commands/commands_grpc_pb'; +import * as commandsGrpcPb from './cli-protocol/commands/commands_grpc_pb'; import { Instance } from './cli-protocol/commands/common_pb'; import { InitReq, InitResp, UpdateIndexReq, UpdateIndexResp, UpdateLibrariesIndexResp, UpdateLibrariesIndexReq } from './cli-protocol/commands/commands_pb'; import { Event, Emitter } from '@theia/core/lib/common/event'; @@ -35,7 +36,10 @@ export class CoreClientProvider extends GrpcClientProvider { - const client = new ArduinoCoreClient(`localhost:${port}`, grpc.credentials.createInsecure(), this.channelOptions); + // https://github.com/agreatfool/grpc_tools_node_protoc_ts/blob/master/doc/grpcjs_support.md#usage + // @ts-ignore + const ArduinoCoreClient = grpc.makeClientConstructor(commandsGrpcPb['cc.arduino.cli.commands.ArduinoCore'], 'ArduinoCoreService') as any; + const client = new ArduinoCoreClient(`localhost:${port}`, grpc.credentials.createInsecure(), this.channelOptions) as ArduinoCoreClient; const initReq = new InitReq(); initReq.setLibraryManagerOnly(false); const initResp = await new Promise((resolve, reject) => { diff --git a/arduino-ide-extension/src/node/grpc-client-provider.ts b/arduino-ide-extension/src/node/grpc-client-provider.ts index 670bc0fb..fd6fa211 100644 --- a/arduino-ide-extension/src/node/grpc-client-provider.ts +++ b/arduino-ide-extension/src/node/grpc-client-provider.ts @@ -1,4 +1,3 @@ -import * as grpc from 'grpc'; import { inject, injectable, postConstruct } from 'inversify'; import { ILogger } from '@theia/core/lib/common/logger'; import { MaybePromise } from '@theia/core/lib/common/types'; @@ -69,7 +68,7 @@ export abstract class GrpcClientProvider { protected abstract close(client: C): void; - protected get channelOptions(): grpc.CallOptions { + protected get channelOptions(): object { return { 'grpc.max_send_message_length': 512 * 1024 * 1024, 'grpc.max_receive_message_length': 512 * 1024 * 1024 diff --git a/arduino-ide-extension/src/node/monitor/monitor-client-provider.ts b/arduino-ide-extension/src/node/monitor/monitor-client-provider.ts index 9666c224..3e9d74a0 100644 --- a/arduino-ide-extension/src/node/monitor/monitor-client-provider.ts +++ b/arduino-ide-extension/src/node/monitor/monitor-client-provider.ts @@ -1,12 +1,16 @@ -import * as grpc from 'grpc'; +import * as grpc from '@grpc/grpc-js'; import { injectable } from 'inversify'; import { MonitorClient } from '../cli-protocol/monitor/monitor_grpc_pb'; +import * as monitorGrpcPb from '../cli-protocol/monitor/monitor_grpc_pb'; import { GrpcClientProvider } from '../grpc-client-provider'; @injectable() export class MonitorClientProvider extends GrpcClientProvider { createClient(port: string | number): MonitorClient { + // https://github.com/agreatfool/grpc_tools_node_protoc_ts/blob/master/doc/grpcjs_support.md#usage + // @ts-ignore + const MonitorClient = grpc.makeClientConstructor(monitorGrpcPb['cc.arduino.cli.monitor.Monitor'], 'MonitorService') as any; return new MonitorClient(`localhost:${port}`, grpc.credentials.createInsecure(), this.channelOptions); } diff --git a/arduino-ide-extension/src/node/monitor/monitor-service-impl.ts b/arduino-ide-extension/src/node/monitor/monitor-service-impl.ts index 349c8cf9..659040fb 100644 --- a/arduino-ide-extension/src/node/monitor/monitor-service-impl.ts +++ b/arduino-ide-extension/src/node/monitor/monitor-service-impl.ts @@ -1,4 +1,4 @@ -import { ClientDuplexStream } from 'grpc'; +import { ClientDuplexStream } from '@grpc/grpc-js'; import { TextDecoder, TextEncoder } from 'util'; import { injectable, inject, named } from 'inversify'; import { Struct } from 'google-protobuf/google/protobuf/struct_pb'; diff --git a/browser-app/package.json b/browser-app/package.json index 26754bba..cccdec00 100644 --- a/browser-app/package.json +++ b/browser-app/package.json @@ -41,6 +41,11 @@ } } }, + "backend": { + "config": { + "configDirName": ".arduinoProIDE" + } + }, "generator": { "config": { "preloadTemplate": "
" diff --git a/package.json b/package.json index d458a515..b1605b76 100644 --- a/package.json +++ b/package.json @@ -17,8 +17,8 @@ "scripts": { "prepare": "cross-env THEIA_ELECTRON_SKIP_REPLACE_FFMPEG=1 lerna run prepare && yarn download:plugins", "rebuild:browser": "theia rebuild:browser", - "rebuild:electron": "theia rebuild:electron --modules \"@theia/node-pty\" nsfw native-keymap find-git-repositories grpc", - "start": "yarn rebuild:electron && yarn --cwd ./electron-app start", + "rebuild:electron": "theia rebuild:electron", + "start": "yarn --cwd ./electron-app start", "watch": "lerna run watch --parallel", "test": "lerna run test", "download:plugins": "theia download:plugins" diff --git a/yarn.lock b/yarn.lock index e73847bb..9995a965 100644 --- a/yarn.lock +++ b/yarn.lock @@ -950,6 +950,13 @@ unique-filename "^1.1.1" which "^1.3.1" +"@grpc/grpc-js@^1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@grpc/grpc-js/-/grpc-js-1.1.1.tgz#56069fee48ba0667a0577a021504c573a6b613f0" + integrity sha512-mhZRszS0SKwnWPJaNyrECePZ9U7vaHFGqrzxQbWinWR3WznBIU+nmh2L5J3elF+lp5DEUIzARXkifbs6LQVAHA== + dependencies: + semver "^6.2.0" + "@lerna/add@3.21.0": version "3.21.0" resolved "https://registry.yarnpkg.com/@lerna/add/-/add-3.21.0.tgz#27007bde71cc7b0a2969ab3c2f0ae41578b4577b" @@ -2504,14 +2511,6 @@ "@types/connect" "*" "@types/node" "*" -"@types/bytebuffer@^5.0.40": - version "5.0.41" - resolved "https://registry.yarnpkg.com/@types/bytebuffer/-/bytebuffer-5.0.41.tgz#6850dba4d4cd2846596b4842874d5bfc01cd3db1" - integrity sha512-Mdrv4YcaHvpkx25ksqqFaezktx3yZRcd51GZY0rY/9avyaqZdiT/GiWRhfrJhMpgzXqTOSHgGvsumGxJFNiZZA== - dependencies: - "@types/long" "*" - "@types/node" "*" - "@types/caseless@*": version "0.12.2" resolved "https://registry.yarnpkg.com/@types/caseless/-/caseless-0.12.2.tgz#f65d3d6389e01eeb458bd54dc8f52b95a9463bc8" @@ -2652,11 +2651,6 @@ resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.157.tgz#fdac1c52448861dfde1a2e1515dbc46e54926dc8" integrity sha512-Ft5BNFmv2pHDgxV5JDsndOWTRJ+56zte0ZpYLowp03tW+K+t8u8YMOzAnpuqPgzX6WO1XpDIUm7u04M8vdDiVQ== -"@types/long@*": - version "4.0.1" - resolved "https://registry.yarnpkg.com/@types/long/-/long-4.0.1.tgz#459c65fa1867dafe6a8f322c4c51695663cc55e9" - integrity sha512-5tXH6Bx/kNGd3MgffdmP4dy2Z+G4eaXw0SE81Tq3BNadtnMR5/ySMzX4SLEzHJzSmPNn4HIdpQsBvXMUykr58w== - "@types/mime-types@^2.1.0": version "2.1.0" resolved "https://registry.yarnpkg.com/@types/mime-types/-/mime-types-2.1.0.tgz#9ca52cda363f699c69466c2a6ccdaad913ea7a73" @@ -3651,14 +3645,6 @@ asap@^2.0.0, asap@~2.0.3: resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" integrity sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY= -ascli@~1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/ascli/-/ascli-1.0.1.tgz#bcfa5974a62f18e81cabaeb49732ab4a88f906bc" - integrity sha1-vPpZdKYvGOgcq660lzKrSoj5Brw= - dependencies: - colour "~0.7.1" - optjs "~3.2.2" - asn1.js@^4.0.0: version "4.10.1" resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-4.10.1.tgz#b9c2bf5805f1e64aadeed6df3a2bfafb5a73f5a0" @@ -4877,13 +4863,6 @@ byte-size@^5.0.1: resolved "https://registry.yarnpkg.com/byte-size/-/byte-size-5.0.1.tgz#4b651039a5ecd96767e71a3d7ed380e48bed4191" integrity sha512-/XuKeqWocKsYa/cBY1YbSJSWWqTi4cFgr9S6OyM7PBaPbr9zvNGwWP33vt0uqGhwDdN+y3yhbXVILEUpnwEWGw== -bytebuffer@~5: - version "5.0.1" - resolved "https://registry.yarnpkg.com/bytebuffer/-/bytebuffer-5.0.1.tgz#582eea4b1a873b6d020a48d58df85f0bba6cfddd" - integrity sha1-WC7qSxqHO20CCkjVjfhfC7ps/d0= - dependencies: - long "~3" - bytes@3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6" @@ -5032,7 +5011,7 @@ camelcase-keys@^6.2.2: map-obj "^4.0.0" quick-lru "^4.0.1" -camelcase@^2.0.0, camelcase@^2.0.1: +camelcase@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f" integrity sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8= @@ -5346,15 +5325,6 @@ cli-width@^3.0.0: resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-3.0.0.tgz#a2f48437a2caa9a22436e794bf071ec9e61cedf6" integrity sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw== -cliui@^3.0.3: - version "3.2.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" - integrity sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0= - dependencies: - string-width "^1.0.1" - strip-ansi "^3.0.1" - wrap-ansi "^2.0.0" - cliui@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-4.1.0.tgz#348422dbe82d800b3022eef4f6ac10bf2e4d1b49" @@ -5516,11 +5486,6 @@ colors@~1.1.2: resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63" integrity sha1-FopHAXVran9RoSzgyXv6KMCE7WM= -colour@~0.7.1: - version "0.7.1" - resolved "https://registry.yarnpkg.com/colour/-/colour-0.7.1.tgz#9cb169917ec5d12c0736d3e8685746df1cadf778" - integrity sha1-nLFpkX7F0SwHNtPoaFdG3xyt93g= - columnify@^1.5.4: version "1.5.4" resolved "https://registry.yarnpkg.com/columnify/-/columnify-1.5.4.tgz#4737ddf1c7b69a8a7c340570782e947eec8e78bb" @@ -7882,7 +7847,7 @@ glob@^6.0.1: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: +glob@^7.0.0, glob@^7.0.3, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: version "7.1.6" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== @@ -8055,29 +8020,17 @@ growl@1.10.5: resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== -grpc-tools@^1.8.0: +grpc-tools@^1.9.0: version "1.9.0" resolved "https://registry.yarnpkg.com/grpc-tools/-/grpc-tools-1.9.0.tgz#57fd0f577dbf842e03215857582f5dc808d96cad" integrity sha512-du10qytFNDVNYGJQ/AxXTF6lXchgCZ7ls8BtBDCtnuinjGbnPFHpOIzoEAT8NsmgFg4RCpsWW8vsQ+RCyQ3SXA== dependencies: node-pre-gyp "^0.12.0" -grpc@^1.24.2: - version "1.24.3" - resolved "https://registry.yarnpkg.com/grpc/-/grpc-1.24.3.tgz#92efe28dfc1250dca179b8133e40b4f2341473d9" - integrity sha512-EDemzuZTfhM0hgrXqC4PtR76O3t+hTIYJYR5vgiW0yt2WJqo4mhxUqZUirzUQz34Psz7dbLp38C6Cl7Ij2vXRQ== - dependencies: - "@types/bytebuffer" "^5.0.40" - lodash.camelcase "^4.3.0" - lodash.clone "^4.5.0" - nan "^2.13.2" - node-pre-gyp "^0.15.0" - protobufjs "^5.0.3" - -grpc_tools_node_protoc_ts@^2.5.8: - version "2.5.11" - resolved "https://registry.yarnpkg.com/grpc_tools_node_protoc_ts/-/grpc_tools_node_protoc_ts-2.5.11.tgz#2334c09bb1186c38aab538984ecfb3c1f0bae272" - integrity sha512-h47COcoJh20fg8fucF1270U3b53xmpnxyo/SlujxEdbxmskjYk8BLd8IpQ0BLZmOozkjJ28zxzBRRadYoAyM9Q== +grpc_tools_node_protoc_ts@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/grpc_tools_node_protoc_ts/-/grpc_tools_node_protoc_ts-4.1.0.tgz#3a5ff0022f7e0ab3a708309f1ff7e61c5c5a63af" + integrity sha512-+10Q2LhTalc41e+hCfP7lCLYfyDlAdntEKTn43QHE3CPafNHRu5KgqAHkDg4cUiDEJFUcKhddaYUPI5uR7c2AA== dependencies: google-protobuf "3.5.0" handlebars "4.7.4" @@ -8715,11 +8668,6 @@ inversify@^5.0.1: resolved "https://registry.yarnpkg.com/inversify/-/inversify-5.0.1.tgz#500d709b1434896ce5a0d58915c4a4210e34fb6e" integrity sha512-Ieh06s48WnEYGcqHepdsJUIJUXpwH5o5vodAX+DK2JA/gjy4EbEcQZxw+uFfzysmKjiLXGYwNG3qDZsKVMcINQ== -invert-kv@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" - integrity sha1-EEqOSqym09jNFXqO+L+rLXo//bY= - invert-kv@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-2.0.0.tgz#7393f5afa59ec9ff5f67a27620d11c226e3eec02" @@ -9417,13 +9365,6 @@ lazy-cache@^2.0.1, lazy-cache@^2.0.2: dependencies: set-getter "^0.1.0" -lcid@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" - integrity sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU= - dependencies: - invert-kv "^1.0.0" - lcid@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/lcid/-/lcid-2.0.0.tgz#6ef5d2df60e52f82eb228a4c373e8d1f397253cf" @@ -9661,11 +9602,6 @@ lodash.camelcase@^4.3.0: resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" integrity sha1-soqmKIorn8ZRA1x3EfZathkDMaY= -lodash.clone@^4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.clone/-/lodash.clone-4.5.0.tgz#195870450f5a13192478df4bc3d23d2dea1907b6" - integrity sha1-GVhwRQ9aExkkeN9Lw9I9LeoZB7Y= - lodash.clonedeep@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" @@ -9789,11 +9725,6 @@ logging-helpers@^1.0.0: isobject "^3.0.0" log-utils "^0.2.1" -long@~3: - version "3.2.0" - resolved "https://registry.yarnpkg.com/long/-/long-3.2.0.tgz#d821b7138ca1cb581c172990ef14db200b5c474b" - integrity sha1-2CG3E4yhy1gcFymQ7xTbIAtcR0s= - loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.3.0, loose-envify@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" @@ -10473,7 +10404,7 @@ mz@^2.5.0: object-assign "^4.0.1" thenify-all "^1.0.0" -nan@^2.0.0, nan@^2.10.0, nan@^2.12.1, nan@^2.13.2, nan@^2.14.0: +nan@^2.0.0, nan@^2.10.0, nan@^2.12.1, nan@^2.14.0: version "2.14.1" resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.1.tgz#d7be34dfa3105b91494c3147089315eff8874b01" integrity sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw== @@ -10505,7 +10436,7 @@ ncp@^2.0.0, ncp@~2.0.0: resolved "https://registry.yarnpkg.com/ncp/-/ncp-2.0.0.tgz#195a21d6c46e361d2fb1281ba38b91e9df7bdbb3" integrity sha1-GVoh1sRuNh0vsSgbo4uR6d9727M= -needle@^2.2.1, needle@^2.5.0: +needle@^2.2.1: version "2.5.0" resolved "https://registry.yarnpkg.com/needle/-/needle-2.5.0.tgz#e6fc4b3cc6c25caed7554bd613a5cf0bac8c31c0" integrity sha512-o/qITSDR0JCyCKEQ1/1bnUXMmznxabbwi/Y4WwJElf+evwJNFNwIDMCCt5IigFVxgeGBJESLohGtIS9gEzo1fA== @@ -10676,22 +10607,6 @@ node-pre-gyp@^0.12.0: semver "^5.3.0" tar "^4" -node-pre-gyp@^0.15.0: - version "0.15.0" - resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.15.0.tgz#c2fc383276b74c7ffa842925241553e8b40f1087" - integrity sha512-7QcZa8/fpaU/BKenjcaeFF9hLz2+7S9AqyXFhlH/rilsQ/hPZKK32RtR5EQHJElgu+q5RfbJ34KriI79UWaorA== - dependencies: - detect-libc "^1.0.2" - mkdirp "^0.5.3" - needle "^2.5.0" - nopt "^4.0.1" - npm-packlist "^1.1.6" - npmlog "^4.0.2" - rc "^1.2.7" - rimraf "^2.6.1" - semver "^5.3.0" - tar "^4.4.2" - node-releases@^1.1.58: version "1.1.58" resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.58.tgz#8ee20eef30fa60e52755fcc0942def5a734fe935" @@ -11064,11 +10979,6 @@ optimist@~0.3.5: dependencies: wordwrap "~0.0.2" -optjs@~3.2.2: - version "3.2.2" - resolved "https://registry.yarnpkg.com/optjs/-/optjs-3.2.2.tgz#69a6ce89c442a44403141ad2f9b370bd5bb6f4ee" - integrity sha1-aabOicRCpEQDFBrS+bNwvVu29O4= - ora@^0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/ora/-/ora-0.2.3.tgz#37527d220adcd53c39b73571d754156d5db657a4" @@ -11101,13 +11011,6 @@ os-homedir@^1.0.0, os-homedir@^1.0.1: resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= -os-locale@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" - integrity sha1-IPnxeuKe00XoveWDsT0gCYA8FNk= - dependencies: - lcid "^1.0.0" - os-locale@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-3.1.0.tgz#a802a6ee17f24c10483ab9935719cef4ed16bf1a" @@ -12012,17 +11915,7 @@ proto-list@~1.2.1: resolved "https://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849" integrity sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk= -protobufjs@^5.0.3: - version "5.0.3" - resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-5.0.3.tgz#e4dfe9fb67c90b2630d15868249bcc4961467a17" - integrity sha512-55Kcx1MhPZX0zTbVosMQEO5R6/rikNXd9b6RQK4KSPcrSIIwoXTtebIczUrXlwaSrbz4x8XUVThGPob1n8I4QA== - dependencies: - ascli "~1" - bytebuffer "~5" - glob "^7.0.5" - yargs "^3.10.0" - -protoc@1.0.4: +protoc@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/protoc/-/protoc-1.0.4.tgz#fd0ba07132c459df80c6135889bd5cc92f0afec2" integrity sha512-2crtOP6xhacdWBW+lkhQJmzwg2cPmqSsh51FOHQmgTd8dKksO9sFzlhzteh6x+qPTfPU7h6smC1eg5d9bqGpTQ== @@ -13903,7 +13796,7 @@ tar@^2.0.0: fstream "^1.0.12" inherits "2" -tar@^4, tar@^4.0.0, tar@^4.0.2, tar@^4.4.10, tar@^4.4.12, tar@^4.4.2, tar@^4.4.8: +tar@^4, tar@^4.0.0, tar@^4.0.2, tar@^4.4.10, tar@^4.4.12, tar@^4.4.8: version "4.4.13" resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.13.tgz#43b364bc52888d555298637b10d60790254ab525" integrity sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA== @@ -14903,11 +14796,6 @@ wide-align@1.1.3, wide-align@^1.1.0: dependencies: string-width "^1.0.2 || 2" -window-size@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.4.tgz#f8e1aa1ee5a53ec5bf151ffa09742a6ad7697876" - integrity sha1-+OGqHuWlPsW/FR/6CXQqatdpeHY= - windows-release@^3.1.0: version "3.3.1" resolved "https://registry.yarnpkg.com/windows-release/-/windows-release-3.3.1.tgz#cb4e80385f8550f709727287bf71035e209c4ace" @@ -15087,7 +14975,7 @@ xterm@^4.4.0: resolved "https://registry.yarnpkg.com/xterm/-/xterm-4.7.0.tgz#254485811146b03fbea10c911f7f68a99e1d3bfd" integrity sha512-UeH6U/1iknCBP94/AcKAFBeQz6ZicMugJHGXruTmsY8RcZt+mkx+vl8jLLOqNYweXdBbywCg2kK88WDKjcmSmg== -y18n@^3.2.0, y18n@^3.2.1: +y18n@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" integrity sha1-bRX7qITAhnnA136I53WegR4H+kE= @@ -15220,19 +15108,6 @@ yargs@^15.3.1: y18n "^4.0.0" yargs-parser "^18.1.1" -yargs@^3.10.0: - version "3.32.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.32.0.tgz#03088e9ebf9e756b69751611d2a5ef591482c995" - integrity sha1-AwiOnr+edWtpdRYR0qXvWRSCyZU= - dependencies: - camelcase "^2.0.1" - cliui "^3.0.3" - decamelize "^1.1.1" - os-locale "^1.4.0" - string-width "^1.0.1" - window-size "^0.1.4" - y18n "^3.2.0" - yauzl@^2.10.0, yauzl@^2.4.2: version "2.10.0" resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.10.0.tgz#c7eb17c93e112cb1086fa6d8e51fb0667b79a5f9"