From d9c682d989abf4a7eb81879ee4f65c86b1b5c294 Mon Sep 17 00:00:00 2001 From: Akos Kitta Date: Tue, 24 Oct 2023 16:48:55 +0200 Subject: [PATCH] chore(cli): update CLI to `0.35.0-rc.2` - Adjust board discovery to new gRPC API. From now on, it's a client read stream, not a duplex. - Allow `.cxx` and `.cc` file extensions. (Closes #2265) Signed-off-by: Akos Kitta --- arduino-ide-extension/package.json | 2 +- .../src/common/protocol/sketches-service.ts | 2 +- .../src/node/board-discovery.ts | 42 +- .../cc/arduino/cli/commands/v1/board_pb.d.ts | 3 - .../cc/arduino/cli/commands/v1/board_pb.js | 32 +- .../cli/commands/v1/commands_grpc_pb.d.ts | 47 +- .../cli/commands/v1/commands_grpc_pb.js | 70 +- .../arduino/cli/commands/v1/commands_pb.d.ts | 1 + .../cc/arduino/cli/commands/v1/commands_pb.js | 2 + .../cc/arduino/cli/commands/v1/core_pb.d.ts | 9 + .../cc/arduino/cli/commands/v1/core_pb.js | 96 +- .../arduino/cli/commands/v1/debug_grpc_pb.js | 1 + .../cli/{debug => commands}/v1/debug_pb.d.ts | 109 +- .../cc/arduino/cli/commands/v1/debug_pb.js | 1725 +++++++++++++++++ .../arduino/cli/debug/v1/debug_grpc_pb.d.ts | 59 - .../cc/arduino/cli/debug/v1/debug_grpc_pb.js | 95 - .../cc/arduino/cli/debug/v1/debug_pb.js | 1233 ------------ .../cli/monitor/v1/monitor_grpc_pb.d.ts | 42 - .../arduino/cli/monitor/v1/monitor_grpc_pb.js | 65 - .../cc/arduino/cli/monitor/v1/monitor_pb.d.ts | 131 -- .../cc/arduino/cli/monitor/v1/monitor_pb.js | 819 -------- 21 files changed, 2037 insertions(+), 2548 deletions(-) create mode 100644 arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/debug_grpc_pb.js rename arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/{debug => commands}/v1/debug_pb.d.ts (51%) create mode 100644 arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/debug_pb.js delete mode 100644 arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/debug/v1/debug_grpc_pb.d.ts delete mode 100644 arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/debug/v1/debug_grpc_pb.js delete mode 100644 arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/debug/v1/debug_pb.js delete mode 100644 arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/monitor/v1/monitor_grpc_pb.d.ts delete mode 100644 arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/monitor/v1/monitor_grpc_pb.js delete mode 100644 arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/monitor/v1/monitor_pb.d.ts delete mode 100644 arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/monitor/v1/monitor_pb.js diff --git a/arduino-ide-extension/package.json b/arduino-ide-extension/package.json index 866844ab8..a8715a45d 100644 --- a/arduino-ide-extension/package.json +++ b/arduino-ide-extension/package.json @@ -169,7 +169,7 @@ ], "arduino": { "arduino-cli": { - "version": "0.34.0" + "version": "0.35.0-rc.2" }, "arduino-fwuploader": { "version": "2.4.1" diff --git a/arduino-ide-extension/src/common/protocol/sketches-service.ts b/arduino-ide-extension/src/common/protocol/sketches-service.ts index 3901f1617..3c98252c1 100644 --- a/arduino-ide-extension/src/common/protocol/sketches-service.ts +++ b/arduino-ide-extension/src/common/protocol/sketches-service.ts @@ -308,7 +308,7 @@ export namespace Sketch { export namespace Extensions { export const DEFAULT = '.ino'; export const MAIN = [DEFAULT, '.pde']; - export const SOURCE = ['.c', '.cpp', '.S']; + export const SOURCE = ['.c', '.cpp', '.S', '.cxx', '.cc']; export const CODE_FILES = [ ...MAIN, ...SOURCE, diff --git a/arduino-ide-extension/src/node/board-discovery.ts b/arduino-ide-extension/src/node/board-discovery.ts index 5d6c137de..628ed97ec 100644 --- a/arduino-ide-extension/src/node/board-discovery.ts +++ b/arduino-ide-extension/src/node/board-discovery.ts @@ -1,4 +1,4 @@ -import type { ClientDuplexStream } from '@grpc/grpc-js'; +import type { ClientReadableStream } from '@grpc/grpc-js'; import { Disposable, DisposableCollection, @@ -30,9 +30,9 @@ import type { Port as RpcPort } from './cli-protocol/cc/arduino/cli/commands/v1/ import { CoreClientAware } from './core-client-provider'; import { ServiceError } from './service-error'; -type Duplex = ClientDuplexStream; +type Stream = ClientReadableStream; interface StreamWrapper extends Disposable { - readonly stream: Duplex; + readonly stream: Stream; readonly uuid: string; // For logging only } @@ -121,34 +121,15 @@ export class BoardDiscovery return Disposable.create(() => clearTimeout(timer)); } - private async requestStartWatch( - req: BoardListWatchRequest, - duplex: Duplex - ): Promise { - return new Promise((resolve, reject) => { - if ( - !duplex.write(req, (err: Error | undefined) => { - if (err) { - reject(err); - return; - } - }) - ) { - duplex.once('drain', resolve); - } else { - process.nextTick(resolve); - } - }); - } - private async createWrapper( - client: ArduinoCoreServiceClient + client: ArduinoCoreServiceClient, + req: BoardListWatchRequest ): Promise { if (this.wrapper) { throw new Error(`Duplex was already set.`); } const stream = client - .boardListWatch() + .boardListWatch(req) .on('end', () => { this.logger.info('received end'); this.onStreamDidEndEmitter.fire(); @@ -202,14 +183,11 @@ export class BoardDiscovery this.watching = new Deferred(); this.logger.info('start new deferred'); const { client, instance } = await this.coreClient; - const wrapper = await this.createWrapper(client); - wrapper.stream.on('data', (resp) => this.onBoardListWatchResponse(resp)); - this.logger.info('start request start watch'); - await this.requestStartWatch( - new BoardListWatchRequest().setInstance(instance), - wrapper.stream + const wrapper = await this.createWrapper( + client, + new BoardListWatchRequest().setInstance(instance) ); - this.logger.info('start requested start watch'); + wrapper.stream.on('data', (resp) => this.onBoardListWatchResponse(resp)); this.watching.resolve(); this.logger.info('start resolved watching'); } diff --git a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/board_pb.d.ts b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/board_pb.d.ts index fbf5b47b7..cf1864b9d 100644 --- a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/board_pb.d.ts +++ b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/board_pb.d.ts @@ -488,8 +488,6 @@ export class BoardListWatchRequest extends jspb.Message { clearInstance(): void; getInstance(): cc_arduino_cli_commands_v1_common_pb.Instance | undefined; setInstance(value?: cc_arduino_cli_commands_v1_common_pb.Instance): BoardListWatchRequest; - getInterrupt(): boolean; - setInterrupt(value: boolean): BoardListWatchRequest; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): BoardListWatchRequest.AsObject; @@ -504,7 +502,6 @@ export class BoardListWatchRequest extends jspb.Message { export namespace BoardListWatchRequest { export type AsObject = { instance?: cc_arduino_cli_commands_v1_common_pb.Instance.AsObject, - interrupt: boolean, } } diff --git a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/board_pb.js b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/board_pb.js index da5148eac..76a3fb175 100644 --- a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/board_pb.js +++ b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/board_pb.js @@ -4181,8 +4181,7 @@ proto.cc.arduino.cli.commands.v1.BoardListWatchRequest.prototype.toObject = func */ proto.cc.arduino.cli.commands.v1.BoardListWatchRequest.toObject = function(includeInstance, msg) { var f, obj = { - instance: (f = msg.getInstance()) && cc_arduino_cli_commands_v1_common_pb.Instance.toObject(includeInstance, f), - interrupt: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) + instance: (f = msg.getInstance()) && cc_arduino_cli_commands_v1_common_pb.Instance.toObject(includeInstance, f) }; if (includeInstance) { @@ -4224,10 +4223,6 @@ proto.cc.arduino.cli.commands.v1.BoardListWatchRequest.deserializeBinaryFromRead reader.readMessage(value,cc_arduino_cli_commands_v1_common_pb.Instance.deserializeBinaryFromReader); msg.setInstance(value); break; - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setInterrupt(value); - break; default: reader.skipField(); break; @@ -4265,13 +4260,6 @@ proto.cc.arduino.cli.commands.v1.BoardListWatchRequest.serializeBinaryToWriter = cc_arduino_cli_commands_v1_common_pb.Instance.serializeBinaryToWriter ); } - f = message.getInterrupt(); - if (f) { - writer.writeBool( - 2, - f - ); - } }; @@ -4312,24 +4300,6 @@ proto.cc.arduino.cli.commands.v1.BoardListWatchRequest.prototype.hasInstance = f }; -/** - * optional bool interrupt = 2; - * @return {boolean} - */ -proto.cc.arduino.cli.commands.v1.BoardListWatchRequest.prototype.getInterrupt = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.cc.arduino.cli.commands.v1.BoardListWatchRequest} returns this - */ -proto.cc.arduino.cli.commands.v1.BoardListWatchRequest.prototype.setInterrupt = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); -}; - - diff --git a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/commands_grpc_pb.d.ts b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/commands_grpc_pb.d.ts index c5159b1cb..0349bbbb4 100644 --- a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/commands_grpc_pb.d.ts +++ b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/commands_grpc_pb.d.ts @@ -11,6 +11,7 @@ import * as cc_arduino_cli_commands_v1_common_pb from "../../../../../cc/arduino import * as cc_arduino_cli_commands_v1_board_pb from "../../../../../cc/arduino/cli/commands/v1/board_pb"; import * as cc_arduino_cli_commands_v1_compile_pb from "../../../../../cc/arduino/cli/commands/v1/compile_pb"; import * as cc_arduino_cli_commands_v1_core_pb from "../../../../../cc/arduino/cli/commands/v1/core_pb"; +import * as cc_arduino_cli_commands_v1_debug_pb from "../../../../../cc/arduino/cli/commands/v1/debug_pb"; import * as cc_arduino_cli_commands_v1_monitor_pb from "../../../../../cc/arduino/cli/commands/v1/monitor_pb"; import * as cc_arduino_cli_commands_v1_upload_pb from "../../../../../cc/arduino/cli/commands/v1/upload_pb"; import * as cc_arduino_cli_commands_v1_lib_pb from "../../../../../cc/arduino/cli/commands/v1/lib_pb"; @@ -55,6 +56,8 @@ interface IArduinoCoreServiceService extends grpc.ServiceDefinition { @@ -185,7 +188,7 @@ interface IArduinoCoreServiceService_IBoardSearch extends grpc.MethodDefinition< } interface IArduinoCoreServiceService_IBoardListWatch extends grpc.MethodDefinition { path: "/cc.arduino.cli.commands.v1.ArduinoCoreService/BoardListWatch"; - requestStream: true; + requestStream: false; responseStream: true; requestSerialize: grpc.serialize; requestDeserialize: grpc.deserialize; @@ -408,6 +411,24 @@ interface IArduinoCoreServiceService_IEnumerateMonitorPortSettings extends grpc. responseSerialize: grpc.serialize; responseDeserialize: grpc.deserialize; } +interface IArduinoCoreServiceService_IDebug extends grpc.MethodDefinition { + path: "/cc.arduino.cli.commands.v1.ArduinoCoreService/Debug"; + requestStream: true; + responseStream: true; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IArduinoCoreServiceService_IGetDebugConfig extends grpc.MethodDefinition { + path: "/cc.arduino.cli.commands.v1.ArduinoCoreService/GetDebugConfig"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} export const ArduinoCoreServiceService: IArduinoCoreServiceService; @@ -426,7 +447,7 @@ export interface IArduinoCoreServiceServer extends grpc.UntypedServiceImplementa boardList: grpc.handleUnaryCall; boardListAll: grpc.handleUnaryCall; boardSearch: grpc.handleUnaryCall; - boardListWatch: grpc.handleBidiStreamingCall; + boardListWatch: grpc.handleServerStreamingCall; compile: grpc.handleServerStreamingCall; platformInstall: grpc.handleServerStreamingCall; platformDownload: grpc.handleServerStreamingCall; @@ -451,6 +472,8 @@ export interface IArduinoCoreServiceServer extends grpc.UntypedServiceImplementa libraryList: grpc.handleUnaryCall; monitor: grpc.handleBidiStreamingCall; enumerateMonitorPortSettings: grpc.handleUnaryCall; + debug: grpc.handleBidiStreamingCall; + getDebugConfig: grpc.handleUnaryCall; } export interface IArduinoCoreServiceClient { @@ -493,9 +516,8 @@ export interface IArduinoCoreServiceClient { boardSearch(request: cc_arduino_cli_commands_v1_board_pb.BoardSearchRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_board_pb.BoardSearchResponse) => void): grpc.ClientUnaryCall; boardSearch(request: cc_arduino_cli_commands_v1_board_pb.BoardSearchRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_board_pb.BoardSearchResponse) => void): grpc.ClientUnaryCall; boardSearch(request: cc_arduino_cli_commands_v1_board_pb.BoardSearchRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_board_pb.BoardSearchResponse) => void): grpc.ClientUnaryCall; - boardListWatch(): grpc.ClientDuplexStream; - boardListWatch(options: Partial): grpc.ClientDuplexStream; - boardListWatch(metadata: grpc.Metadata, options?: Partial): grpc.ClientDuplexStream; + boardListWatch(request: cc_arduino_cli_commands_v1_board_pb.BoardListWatchRequest, options?: Partial): grpc.ClientReadableStream; + boardListWatch(request: cc_arduino_cli_commands_v1_board_pb.BoardListWatchRequest, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; compile(request: cc_arduino_cli_commands_v1_compile_pb.CompileRequest, options?: Partial): grpc.ClientReadableStream; compile(request: cc_arduino_cli_commands_v1_compile_pb.CompileRequest, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; platformInstall(request: cc_arduino_cli_commands_v1_core_pb.PlatformInstallRequest, options?: Partial): grpc.ClientReadableStream; @@ -553,6 +575,12 @@ export interface IArduinoCoreServiceClient { enumerateMonitorPortSettings(request: cc_arduino_cli_commands_v1_monitor_pb.EnumerateMonitorPortSettingsRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_monitor_pb.EnumerateMonitorPortSettingsResponse) => void): grpc.ClientUnaryCall; enumerateMonitorPortSettings(request: cc_arduino_cli_commands_v1_monitor_pb.EnumerateMonitorPortSettingsRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_monitor_pb.EnumerateMonitorPortSettingsResponse) => void): grpc.ClientUnaryCall; enumerateMonitorPortSettings(request: cc_arduino_cli_commands_v1_monitor_pb.EnumerateMonitorPortSettingsRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_monitor_pb.EnumerateMonitorPortSettingsResponse) => void): grpc.ClientUnaryCall; + debug(): grpc.ClientDuplexStream; + debug(options: Partial): grpc.ClientDuplexStream; + debug(metadata: grpc.Metadata, options?: Partial): grpc.ClientDuplexStream; + getDebugConfig(request: cc_arduino_cli_commands_v1_debug_pb.GetDebugConfigRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_debug_pb.GetDebugConfigResponse) => void): grpc.ClientUnaryCall; + getDebugConfig(request: cc_arduino_cli_commands_v1_debug_pb.GetDebugConfigRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_debug_pb.GetDebugConfigResponse) => void): grpc.ClientUnaryCall; + getDebugConfig(request: cc_arduino_cli_commands_v1_debug_pb.GetDebugConfigRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_debug_pb.GetDebugConfigResponse) => void): grpc.ClientUnaryCall; } export class ArduinoCoreServiceClient extends grpc.Client implements IArduinoCoreServiceClient { @@ -596,8 +624,8 @@ export class ArduinoCoreServiceClient extends grpc.Client implements IArduinoCor public boardSearch(request: cc_arduino_cli_commands_v1_board_pb.BoardSearchRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_board_pb.BoardSearchResponse) => void): grpc.ClientUnaryCall; public boardSearch(request: cc_arduino_cli_commands_v1_board_pb.BoardSearchRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_board_pb.BoardSearchResponse) => void): grpc.ClientUnaryCall; public boardSearch(request: cc_arduino_cli_commands_v1_board_pb.BoardSearchRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_board_pb.BoardSearchResponse) => void): grpc.ClientUnaryCall; - public boardListWatch(options?: Partial): grpc.ClientDuplexStream; - public boardListWatch(metadata?: grpc.Metadata, options?: Partial): grpc.ClientDuplexStream; + public boardListWatch(request: cc_arduino_cli_commands_v1_board_pb.BoardListWatchRequest, options?: Partial): grpc.ClientReadableStream; + public boardListWatch(request: cc_arduino_cli_commands_v1_board_pb.BoardListWatchRequest, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; public compile(request: cc_arduino_cli_commands_v1_compile_pb.CompileRequest, options?: Partial): grpc.ClientReadableStream; public compile(request: cc_arduino_cli_commands_v1_compile_pb.CompileRequest, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; public platformInstall(request: cc_arduino_cli_commands_v1_core_pb.PlatformInstallRequest, options?: Partial): grpc.ClientReadableStream; @@ -654,4 +682,9 @@ export class ArduinoCoreServiceClient extends grpc.Client implements IArduinoCor public enumerateMonitorPortSettings(request: cc_arduino_cli_commands_v1_monitor_pb.EnumerateMonitorPortSettingsRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_monitor_pb.EnumerateMonitorPortSettingsResponse) => void): grpc.ClientUnaryCall; public enumerateMonitorPortSettings(request: cc_arduino_cli_commands_v1_monitor_pb.EnumerateMonitorPortSettingsRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_monitor_pb.EnumerateMonitorPortSettingsResponse) => void): grpc.ClientUnaryCall; public enumerateMonitorPortSettings(request: cc_arduino_cli_commands_v1_monitor_pb.EnumerateMonitorPortSettingsRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_monitor_pb.EnumerateMonitorPortSettingsResponse) => void): grpc.ClientUnaryCall; + public debug(options?: Partial): grpc.ClientDuplexStream; + public debug(metadata?: grpc.Metadata, options?: Partial): grpc.ClientDuplexStream; + public getDebugConfig(request: cc_arduino_cli_commands_v1_debug_pb.GetDebugConfigRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_debug_pb.GetDebugConfigResponse) => void): grpc.ClientUnaryCall; + public getDebugConfig(request: cc_arduino_cli_commands_v1_debug_pb.GetDebugConfigRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_debug_pb.GetDebugConfigResponse) => void): grpc.ClientUnaryCall; + public getDebugConfig(request: cc_arduino_cli_commands_v1_debug_pb.GetDebugConfigRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_debug_pb.GetDebugConfigResponse) => void): grpc.ClientUnaryCall; } diff --git a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/commands_grpc_pb.js b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/commands_grpc_pb.js index 8947c7570..690655b7a 100644 --- a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/commands_grpc_pb.js +++ b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/commands_grpc_pb.js @@ -23,6 +23,7 @@ var cc_arduino_cli_commands_v1_common_pb = require('../../../../../cc/arduino/cl var cc_arduino_cli_commands_v1_board_pb = require('../../../../../cc/arduino/cli/commands/v1/board_pb.js'); var cc_arduino_cli_commands_v1_compile_pb = require('../../../../../cc/arduino/cli/commands/v1/compile_pb.js'); var cc_arduino_cli_commands_v1_core_pb = require('../../../../../cc/arduino/cli/commands/v1/core_pb.js'); +var cc_arduino_cli_commands_v1_debug_pb = require('../../../../../cc/arduino/cli/commands/v1/debug_pb.js'); var cc_arduino_cli_commands_v1_monitor_pb = require('../../../../../cc/arduino/cli/commands/v1/monitor_pb.js'); var cc_arduino_cli_commands_v1_upload_pb = require('../../../../../cc/arduino/cli/commands/v1/upload_pb.js'); var cc_arduino_cli_commands_v1_lib_pb = require('../../../../../cc/arduino/cli/commands/v1/lib_pb.js'); @@ -225,6 +226,28 @@ function deserialize_cc_arduino_cli_commands_v1_CreateResponse(buffer_arg) { return cc_arduino_cli_commands_v1_commands_pb.CreateResponse.deserializeBinary(new Uint8Array(buffer_arg)); } +function serialize_cc_arduino_cli_commands_v1_DebugRequest(arg) { + if (!(arg instanceof cc_arduino_cli_commands_v1_debug_pb.DebugRequest)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.v1.DebugRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_v1_DebugRequest(buffer_arg) { + return cc_arduino_cli_commands_v1_debug_pb.DebugRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_v1_DebugResponse(arg) { + if (!(arg instanceof cc_arduino_cli_commands_v1_debug_pb.DebugResponse)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.v1.DebugResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_v1_DebugResponse(buffer_arg) { + return cc_arduino_cli_commands_v1_debug_pb.DebugResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + function serialize_cc_arduino_cli_commands_v1_DestroyRequest(arg) { if (!(arg instanceof cc_arduino_cli_commands_v1_commands_pb.DestroyRequest)) { throw new Error('Expected argument of type cc.arduino.cli.commands.v1.DestroyRequest'); @@ -269,6 +292,28 @@ function deserialize_cc_arduino_cli_commands_v1_EnumerateMonitorPortSettingsResp return cc_arduino_cli_commands_v1_monitor_pb.EnumerateMonitorPortSettingsResponse.deserializeBinary(new Uint8Array(buffer_arg)); } +function serialize_cc_arduino_cli_commands_v1_GetDebugConfigRequest(arg) { + if (!(arg instanceof cc_arduino_cli_commands_v1_debug_pb.GetDebugConfigRequest)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.v1.GetDebugConfigRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_v1_GetDebugConfigRequest(buffer_arg) { + return cc_arduino_cli_commands_v1_debug_pb.GetDebugConfigRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_v1_GetDebugConfigResponse(arg) { + if (!(arg instanceof cc_arduino_cli_commands_v1_debug_pb.GetDebugConfigResponse)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.v1.GetDebugConfigResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_v1_GetDebugConfigResponse(buffer_arg) { + return cc_arduino_cli_commands_v1_debug_pb.GetDebugConfigResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + function serialize_cc_arduino_cli_commands_v1_GitLibraryInstallRequest(arg) { if (!(arg instanceof cc_arduino_cli_commands_v1_lib_pb.GitLibraryInstallRequest)) { throw new Error('Expected argument of type cc.arduino.cli.commands.v1.GitLibraryInstallRequest'); @@ -1065,7 +1110,7 @@ boardSearch: { // List boards connection and disconnected events. boardListWatch: { path: '/cc.arduino.cli.commands.v1.ArduinoCoreService/BoardListWatch', - requestStream: true, + requestStream: false, responseStream: true, requestType: cc_arduino_cli_commands_v1_board_pb.BoardListWatchRequest, responseType: cc_arduino_cli_commands_v1_board_pb.BoardListWatchResponse, @@ -1367,5 +1412,28 @@ enumerateMonitorPortSettings: { responseSerialize: serialize_cc_arduino_cli_commands_v1_EnumerateMonitorPortSettingsResponse, responseDeserialize: deserialize_cc_arduino_cli_commands_v1_EnumerateMonitorPortSettingsResponse, }, + // Start a debug session and communicate with the debugger tool. +debug: { + path: '/cc.arduino.cli.commands.v1.ArduinoCoreService/Debug', + requestStream: true, + responseStream: true, + requestType: cc_arduino_cli_commands_v1_debug_pb.DebugRequest, + responseType: cc_arduino_cli_commands_v1_debug_pb.DebugResponse, + requestSerialize: serialize_cc_arduino_cli_commands_v1_DebugRequest, + requestDeserialize: deserialize_cc_arduino_cli_commands_v1_DebugRequest, + responseSerialize: serialize_cc_arduino_cli_commands_v1_DebugResponse, + responseDeserialize: deserialize_cc_arduino_cli_commands_v1_DebugResponse, + }, + getDebugConfig: { + path: '/cc.arduino.cli.commands.v1.ArduinoCoreService/GetDebugConfig', + requestStream: false, + responseStream: false, + requestType: cc_arduino_cli_commands_v1_debug_pb.GetDebugConfigRequest, + responseType: cc_arduino_cli_commands_v1_debug_pb.GetDebugConfigResponse, + requestSerialize: serialize_cc_arduino_cli_commands_v1_GetDebugConfigRequest, + requestDeserialize: deserialize_cc_arduino_cli_commands_v1_GetDebugConfigRequest, + responseSerialize: serialize_cc_arduino_cli_commands_v1_GetDebugConfigResponse, + responseDeserialize: deserialize_cc_arduino_cli_commands_v1_GetDebugConfigResponse, + }, }; diff --git a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/commands_pb.d.ts b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/commands_pb.d.ts index 6957c8971..981a4c793 100644 --- a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/commands_pb.d.ts +++ b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/commands_pb.d.ts @@ -10,6 +10,7 @@ import * as cc_arduino_cli_commands_v1_common_pb from "../../../../../cc/arduino import * as cc_arduino_cli_commands_v1_board_pb from "../../../../../cc/arduino/cli/commands/v1/board_pb"; import * as cc_arduino_cli_commands_v1_compile_pb from "../../../../../cc/arduino/cli/commands/v1/compile_pb"; import * as cc_arduino_cli_commands_v1_core_pb from "../../../../../cc/arduino/cli/commands/v1/core_pb"; +import * as cc_arduino_cli_commands_v1_debug_pb from "../../../../../cc/arduino/cli/commands/v1/debug_pb"; import * as cc_arduino_cli_commands_v1_monitor_pb from "../../../../../cc/arduino/cli/commands/v1/monitor_pb"; import * as cc_arduino_cli_commands_v1_upload_pb from "../../../../../cc/arduino/cli/commands/v1/upload_pb"; import * as cc_arduino_cli_commands_v1_lib_pb from "../../../../../cc/arduino/cli/commands/v1/lib_pb"; diff --git a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/commands_pb.js b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/commands_pb.js index 5ce1aa6bc..7c8f9d694 100644 --- a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/commands_pb.js +++ b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/commands_pb.js @@ -31,6 +31,8 @@ var cc_arduino_cli_commands_v1_compile_pb = require('../../../../../cc/arduino/c goog.object.extend(proto, cc_arduino_cli_commands_v1_compile_pb); var cc_arduino_cli_commands_v1_core_pb = require('../../../../../cc/arduino/cli/commands/v1/core_pb.js'); goog.object.extend(proto, cc_arduino_cli_commands_v1_core_pb); +var cc_arduino_cli_commands_v1_debug_pb = require('../../../../../cc/arduino/cli/commands/v1/debug_pb.js'); +goog.object.extend(proto, cc_arduino_cli_commands_v1_debug_pb); var cc_arduino_cli_commands_v1_monitor_pb = require('../../../../../cc/arduino/cli/commands/v1/monitor_pb.js'); goog.object.extend(proto, cc_arduino_cli_commands_v1_monitor_pb); var cc_arduino_cli_commands_v1_upload_pb = require('../../../../../cc/arduino/cli/commands/v1/upload_pb.js'); diff --git a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/core_pb.d.ts b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/core_pb.d.ts index 3034f8446..99b25cb15 100644 --- a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/core_pb.d.ts +++ b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/core_pb.d.ts @@ -23,6 +23,8 @@ export class PlatformInstallRequest extends jspb.Message { setSkipPostInstall(value: boolean): PlatformInstallRequest; getNoOverwrite(): boolean; setNoOverwrite(value: boolean): PlatformInstallRequest; + getSkipPreUninstall(): boolean; + setSkipPreUninstall(value: boolean): PlatformInstallRequest; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): PlatformInstallRequest.AsObject; @@ -42,6 +44,7 @@ export namespace PlatformInstallRequest { version: string, skipPostInstall: boolean, noOverwrite: boolean, + skipPreUninstall: boolean, } } @@ -156,6 +159,8 @@ export class PlatformUninstallRequest extends jspb.Message { setPlatformPackage(value: string): PlatformUninstallRequest; getArchitecture(): string; setArchitecture(value: string): PlatformUninstallRequest; + getSkipPreUninstall(): boolean; + setSkipPreUninstall(value: boolean): PlatformUninstallRequest; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): PlatformUninstallRequest.AsObject; @@ -172,6 +177,7 @@ export namespace PlatformUninstallRequest { instance?: cc_arduino_cli_commands_v1_common_pb.Instance.AsObject, platformPackage: string, architecture: string, + skipPreUninstall: boolean, } } @@ -227,6 +233,8 @@ export class PlatformUpgradeRequest extends jspb.Message { setArchitecture(value: string): PlatformUpgradeRequest; getSkipPostInstall(): boolean; setSkipPostInstall(value: boolean): PlatformUpgradeRequest; + getSkipPreUninstall(): boolean; + setSkipPreUninstall(value: boolean): PlatformUpgradeRequest; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): PlatformUpgradeRequest.AsObject; @@ -244,6 +252,7 @@ export namespace PlatformUpgradeRequest { platformPackage: string, architecture: string, skipPostInstall: boolean, + skipPreUninstall: boolean, } } diff --git a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/core_pb.js b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/core_pb.js index 837c234fe..9e49ed462 100644 --- a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/core_pb.js +++ b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/core_pb.js @@ -368,7 +368,8 @@ proto.cc.arduino.cli.commands.v1.PlatformInstallRequest.toObject = function(incl architecture: jspb.Message.getFieldWithDefault(msg, 3, ""), version: jspb.Message.getFieldWithDefault(msg, 4, ""), skipPostInstall: jspb.Message.getBooleanFieldWithDefault(msg, 5, false), - noOverwrite: jspb.Message.getBooleanFieldWithDefault(msg, 6, false) + noOverwrite: jspb.Message.getBooleanFieldWithDefault(msg, 6, false), + skipPreUninstall: jspb.Message.getBooleanFieldWithDefault(msg, 7, false) }; if (includeInstance) { @@ -430,6 +431,10 @@ proto.cc.arduino.cli.commands.v1.PlatformInstallRequest.deserializeBinaryFromRea var value = /** @type {boolean} */ (reader.readBool()); msg.setNoOverwrite(value); break; + case 7: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setSkipPreUninstall(value); + break; default: reader.skipField(); break; @@ -502,6 +507,13 @@ proto.cc.arduino.cli.commands.v1.PlatformInstallRequest.serializeBinaryToWriter f ); } + f = message.getSkipPreUninstall(); + if (f) { + writer.writeBool( + 7, + f + ); + } }; @@ -632,6 +644,24 @@ proto.cc.arduino.cli.commands.v1.PlatformInstallRequest.prototype.setNoOverwrite }; +/** + * optional bool skip_pre_uninstall = 7; + * @return {boolean} + */ +proto.cc.arduino.cli.commands.v1.PlatformInstallRequest.prototype.getSkipPreUninstall = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cc.arduino.cli.commands.v1.PlatformInstallRequest} returns this + */ +proto.cc.arduino.cli.commands.v1.PlatformInstallRequest.prototype.setSkipPreUninstall = function(value) { + return jspb.Message.setProto3BooleanField(this, 7, value); +}; + + @@ -1361,7 +1391,8 @@ proto.cc.arduino.cli.commands.v1.PlatformUninstallRequest.toObject = function(in var f, obj = { instance: (f = msg.getInstance()) && cc_arduino_cli_commands_v1_common_pb.Instance.toObject(includeInstance, f), platformPackage: jspb.Message.getFieldWithDefault(msg, 2, ""), - architecture: jspb.Message.getFieldWithDefault(msg, 3, "") + architecture: jspb.Message.getFieldWithDefault(msg, 3, ""), + skipPreUninstall: jspb.Message.getBooleanFieldWithDefault(msg, 4, false) }; if (includeInstance) { @@ -1411,6 +1442,10 @@ proto.cc.arduino.cli.commands.v1.PlatformUninstallRequest.deserializeBinaryFromR var value = /** @type {string} */ (reader.readString()); msg.setArchitecture(value); break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setSkipPreUninstall(value); + break; default: reader.skipField(); break; @@ -1462,6 +1497,13 @@ proto.cc.arduino.cli.commands.v1.PlatformUninstallRequest.serializeBinaryToWrite f ); } + f = message.getSkipPreUninstall(); + if (f) { + writer.writeBool( + 4, + f + ); + } }; @@ -1538,6 +1580,24 @@ proto.cc.arduino.cli.commands.v1.PlatformUninstallRequest.prototype.setArchitect }; +/** + * optional bool skip_pre_uninstall = 4; + * @return {boolean} + */ +proto.cc.arduino.cli.commands.v1.PlatformUninstallRequest.prototype.getSkipPreUninstall = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cc.arduino.cli.commands.v1.PlatformUninstallRequest} returns this + */ +proto.cc.arduino.cli.commands.v1.PlatformUninstallRequest.prototype.setSkipPreUninstall = function(value) { + return jspb.Message.setProto3BooleanField(this, 4, value); +}; + + @@ -1825,7 +1885,8 @@ proto.cc.arduino.cli.commands.v1.PlatformUpgradeRequest.toObject = function(incl instance: (f = msg.getInstance()) && cc_arduino_cli_commands_v1_common_pb.Instance.toObject(includeInstance, f), platformPackage: jspb.Message.getFieldWithDefault(msg, 2, ""), architecture: jspb.Message.getFieldWithDefault(msg, 3, ""), - skipPostInstall: jspb.Message.getBooleanFieldWithDefault(msg, 4, false) + skipPostInstall: jspb.Message.getBooleanFieldWithDefault(msg, 4, false), + skipPreUninstall: jspb.Message.getBooleanFieldWithDefault(msg, 5, false) }; if (includeInstance) { @@ -1879,6 +1940,10 @@ proto.cc.arduino.cli.commands.v1.PlatformUpgradeRequest.deserializeBinaryFromRea var value = /** @type {boolean} */ (reader.readBool()); msg.setSkipPostInstall(value); break; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setSkipPreUninstall(value); + break; default: reader.skipField(); break; @@ -1937,6 +2002,13 @@ proto.cc.arduino.cli.commands.v1.PlatformUpgradeRequest.serializeBinaryToWriter f ); } + f = message.getSkipPreUninstall(); + if (f) { + writer.writeBool( + 5, + f + ); + } }; @@ -2031,6 +2103,24 @@ proto.cc.arduino.cli.commands.v1.PlatformUpgradeRequest.prototype.setSkipPostIns }; +/** + * optional bool skip_pre_uninstall = 5; + * @return {boolean} + */ +proto.cc.arduino.cli.commands.v1.PlatformUpgradeRequest.prototype.getSkipPreUninstall = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cc.arduino.cli.commands.v1.PlatformUpgradeRequest} returns this + */ +proto.cc.arduino.cli.commands.v1.PlatformUpgradeRequest.prototype.setSkipPreUninstall = function(value) { + return jspb.Message.setProto3BooleanField(this, 5, value); +}; + + diff --git a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/debug_grpc_pb.js b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/debug_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/debug_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/cc/arduino/cli/debug/v1/debug_pb.d.ts b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/debug_pb.d.ts similarity index 51% rename from arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/debug/v1/debug_pb.d.ts rename to arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/debug_pb.d.ts index 5a8f0d0f6..622bd778f 100644 --- a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/debug/v1/debug_pb.d.ts +++ b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/debug_pb.d.ts @@ -1,5 +1,5 @@ -// package: cc.arduino.cli.debug.v1 -// file: cc/arduino/cli/debug/v1/debug.proto +// package: cc.arduino.cli.commands.v1 +// file: cc/arduino/cli/commands/v1/debug.proto /* tslint:disable */ /* eslint-disable */ @@ -7,13 +7,14 @@ import * as jspb from "google-protobuf"; import * as cc_arduino_cli_commands_v1_common_pb from "../../../../../cc/arduino/cli/commands/v1/common_pb"; import * as cc_arduino_cli_commands_v1_port_pb from "../../../../../cc/arduino/cli/commands/v1/port_pb"; +import * as google_protobuf_any_pb from "google-protobuf/google/protobuf/any_pb"; export class DebugRequest extends jspb.Message { hasDebugRequest(): boolean; clearDebugRequest(): void; - getDebugRequest(): DebugConfigRequest | undefined; - setDebugRequest(value?: DebugConfigRequest): DebugRequest; + getDebugRequest(): GetDebugConfigRequest | undefined; + setDebugRequest(value?: GetDebugConfigRequest): DebugRequest; getData(): Uint8Array | string; getData_asU8(): Uint8Array; getData_asB64(): string; @@ -33,45 +34,45 @@ export class DebugRequest extends jspb.Message { export namespace DebugRequest { export type AsObject = { - debugRequest?: DebugConfigRequest.AsObject, + debugRequest?: GetDebugConfigRequest.AsObject, data: Uint8Array | string, sendInterrupt: boolean, } } -export class DebugConfigRequest extends jspb.Message { +export class GetDebugConfigRequest extends jspb.Message { hasInstance(): boolean; clearInstance(): void; getInstance(): cc_arduino_cli_commands_v1_common_pb.Instance | undefined; - setInstance(value?: cc_arduino_cli_commands_v1_common_pb.Instance): DebugConfigRequest; + setInstance(value?: cc_arduino_cli_commands_v1_common_pb.Instance): GetDebugConfigRequest; getFqbn(): string; - setFqbn(value: string): DebugConfigRequest; + setFqbn(value: string): GetDebugConfigRequest; getSketchPath(): string; - setSketchPath(value: string): DebugConfigRequest; + setSketchPath(value: string): GetDebugConfigRequest; hasPort(): boolean; clearPort(): void; getPort(): cc_arduino_cli_commands_v1_port_pb.Port | undefined; - setPort(value?: cc_arduino_cli_commands_v1_port_pb.Port): DebugConfigRequest; + setPort(value?: cc_arduino_cli_commands_v1_port_pb.Port): GetDebugConfigRequest; getInterpreter(): string; - setInterpreter(value: string): DebugConfigRequest; + setInterpreter(value: string): GetDebugConfigRequest; getImportDir(): string; - setImportDir(value: string): DebugConfigRequest; + setImportDir(value: string): GetDebugConfigRequest; getProgrammer(): string; - setProgrammer(value: string): DebugConfigRequest; + setProgrammer(value: string): GetDebugConfigRequest; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DebugConfigRequest.AsObject; - static toObject(includeInstance: boolean, msg: DebugConfigRequest): DebugConfigRequest.AsObject; + toObject(includeInstance?: boolean): GetDebugConfigRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetDebugConfigRequest): GetDebugConfigRequest.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: DebugConfigRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): DebugConfigRequest; - static deserializeBinaryFromReader(message: DebugConfigRequest, reader: jspb.BinaryReader): DebugConfigRequest; + static serializeBinaryToWriter(message: GetDebugConfigRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetDebugConfigRequest; + static deserializeBinaryFromReader(message: GetDebugConfigRequest, reader: jspb.BinaryReader): GetDebugConfigRequest; } -export namespace DebugConfigRequest { +export namespace GetDebugConfigRequest { export type AsObject = { instance?: cc_arduino_cli_commands_v1_common_pb.Instance.AsObject, fqbn: string, @@ -122,11 +123,22 @@ export class GetDebugConfigResponse extends jspb.Message { getServerPath(): string; setServerPath(value: string): GetDebugConfigResponse; - getToolchainConfigurationMap(): jspb.Map; - clearToolchainConfigurationMap(): void; + hasToolchainConfiguration(): boolean; + clearToolchainConfiguration(): void; + getToolchainConfiguration(): google_protobuf_any_pb.Any | undefined; + setToolchainConfiguration(value?: google_protobuf_any_pb.Any): GetDebugConfigResponse; - getServerConfigurationMap(): jspb.Map; - clearServerConfigurationMap(): void; + hasServerConfiguration(): boolean; + clearServerConfiguration(): void; + getServerConfiguration(): google_protobuf_any_pb.Any | undefined; + setServerConfiguration(value?: google_protobuf_any_pb.Any): GetDebugConfigResponse; + + getCustomConfigsMap(): jspb.Map; + clearCustomConfigsMap(): void; + getSvdFile(): string; + setSvdFile(value: string): GetDebugConfigResponse; + getProgrammer(): string; + setProgrammer(value: string): GetDebugConfigResponse; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): GetDebugConfigResponse.AsObject; @@ -146,9 +158,56 @@ export namespace GetDebugConfigResponse { toolchainPrefix: string, server: string, serverPath: string, + toolchainConfiguration?: google_protobuf_any_pb.Any.AsObject, + serverConfiguration?: google_protobuf_any_pb.Any.AsObject, + + customConfigsMap: Array<[string, string]>, + svdFile: string, + programmer: string, + } +} + +export class DebugGCCToolchainConfiguration extends jspb.Message { + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DebugGCCToolchainConfiguration.AsObject; + static toObject(includeInstance: boolean, msg: DebugGCCToolchainConfiguration): DebugGCCToolchainConfiguration.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DebugGCCToolchainConfiguration, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DebugGCCToolchainConfiguration; + static deserializeBinaryFromReader(message: DebugGCCToolchainConfiguration, reader: jspb.BinaryReader): DebugGCCToolchainConfiguration; +} + +export namespace DebugGCCToolchainConfiguration { + export type AsObject = { + } +} - toolchainConfigurationMap: Array<[string, string]>, +export class DebugOpenOCDServerConfiguration extends jspb.Message { + getPath(): string; + setPath(value: string): DebugOpenOCDServerConfiguration; + getScriptsDir(): string; + setScriptsDir(value: string): DebugOpenOCDServerConfiguration; + clearScriptsList(): void; + getScriptsList(): Array; + setScriptsList(value: Array): DebugOpenOCDServerConfiguration; + addScripts(value: string, index?: number): string; - serverConfigurationMap: Array<[string, string]>, + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DebugOpenOCDServerConfiguration.AsObject; + static toObject(includeInstance: boolean, msg: DebugOpenOCDServerConfiguration): DebugOpenOCDServerConfiguration.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DebugOpenOCDServerConfiguration, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DebugOpenOCDServerConfiguration; + static deserializeBinaryFromReader(message: DebugOpenOCDServerConfiguration, reader: jspb.BinaryReader): DebugOpenOCDServerConfiguration; +} + +export namespace DebugOpenOCDServerConfiguration { + export type AsObject = { + path: string, + scriptsDir: string, + scriptsList: Array, } } diff --git a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/debug_pb.js b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/debug_pb.js new file mode 100644 index 000000000..6e2e0b424 --- /dev/null +++ b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/debug_pb.js @@ -0,0 +1,1725 @@ +// source: cc/arduino/cli/commands/v1/debug.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @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! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { + if (this) { return this; } + if (typeof window !== 'undefined') { return window; } + if (typeof global !== 'undefined') { return global; } + if (typeof self !== 'undefined') { return self; } + return Function('return this')(); +}.call(null)); + +var cc_arduino_cli_commands_v1_common_pb = require('../../../../../cc/arduino/cli/commands/v1/common_pb.js'); +goog.object.extend(proto, cc_arduino_cli_commands_v1_common_pb); +var cc_arduino_cli_commands_v1_port_pb = require('../../../../../cc/arduino/cli/commands/v1/port_pb.js'); +goog.object.extend(proto, cc_arduino_cli_commands_v1_port_pb); +var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); +goog.object.extend(proto, google_protobuf_any_pb); +goog.exportSymbol('proto.cc.arduino.cli.commands.v1.DebugGCCToolchainConfiguration', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.v1.DebugOpenOCDServerConfiguration', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.v1.DebugRequest', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.v1.DebugResponse', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.v1.GetDebugConfigRequest', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.v1.GetDebugConfigResponse', 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.v1.DebugRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.v1.DebugRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.v1.DebugRequest.displayName = 'proto.cc.arduino.cli.commands.v1.DebugRequest'; +} +/** + * 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.v1.GetDebugConfigRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.v1.GetDebugConfigRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.v1.GetDebugConfigRequest.displayName = 'proto.cc.arduino.cli.commands.v1.GetDebugConfigRequest'; +} +/** + * 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.v1.DebugResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.v1.DebugResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.v1.DebugResponse.displayName = 'proto.cc.arduino.cli.commands.v1.DebugResponse'; +} +/** + * 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.v1.GetDebugConfigResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.v1.GetDebugConfigResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.v1.GetDebugConfigResponse.displayName = 'proto.cc.arduino.cli.commands.v1.GetDebugConfigResponse'; +} +/** + * 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.v1.DebugGCCToolchainConfiguration = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.v1.DebugGCCToolchainConfiguration, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.v1.DebugGCCToolchainConfiguration.displayName = 'proto.cc.arduino.cli.commands.v1.DebugGCCToolchainConfiguration'; +} +/** + * 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.v1.DebugOpenOCDServerConfiguration = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cc.arduino.cli.commands.v1.DebugOpenOCDServerConfiguration.repeatedFields_, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.v1.DebugOpenOCDServerConfiguration, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.v1.DebugOpenOCDServerConfiguration.displayName = 'proto.cc.arduino.cli.commands.v1.DebugOpenOCDServerConfiguration'; +} + + + +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.v1.DebugRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.v1.DebugRequest.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.v1.DebugRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.v1.DebugRequest.toObject = function(includeInstance, msg) { + var f, obj = { + debugRequest: (f = msg.getDebugRequest()) && proto.cc.arduino.cli.commands.v1.GetDebugConfigRequest.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.commands.v1.DebugRequest} + */ +proto.cc.arduino.cli.commands.v1.DebugRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.v1.DebugRequest; + return proto.cc.arduino.cli.commands.v1.DebugRequest.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.v1.DebugRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.v1.DebugRequest} + */ +proto.cc.arduino.cli.commands.v1.DebugRequest.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.v1.GetDebugConfigRequest; + reader.readMessage(value,proto.cc.arduino.cli.commands.v1.GetDebugConfigRequest.deserializeBinaryFromReader); + msg.setDebugRequest(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.commands.v1.DebugRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.v1.DebugRequest.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.v1.DebugRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.v1.DebugRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDebugRequest(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.cc.arduino.cli.commands.v1.GetDebugConfigRequest.serializeBinaryToWriter + ); + } + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getSendInterrupt(); + if (f) { + writer.writeBool( + 3, + f + ); + } +}; + + +/** + * optional GetDebugConfigRequest debug_request = 1; + * @return {?proto.cc.arduino.cli.commands.v1.GetDebugConfigRequest} + */ +proto.cc.arduino.cli.commands.v1.DebugRequest.prototype.getDebugRequest = function() { + return /** @type{?proto.cc.arduino.cli.commands.v1.GetDebugConfigRequest} */ ( + jspb.Message.getWrapperField(this, proto.cc.arduino.cli.commands.v1.GetDebugConfigRequest, 1)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.v1.GetDebugConfigRequest|undefined} value + * @return {!proto.cc.arduino.cli.commands.v1.DebugRequest} returns this +*/ +proto.cc.arduino.cli.commands.v1.DebugRequest.prototype.setDebugRequest = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.v1.DebugRequest} returns this + */ +proto.cc.arduino.cli.commands.v1.DebugRequest.prototype.clearDebugRequest = function() { + return this.setDebugRequest(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.v1.DebugRequest.prototype.hasDebugRequest = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bytes data = 2; + * @return {!(string|Uint8Array)} + */ +proto.cc.arduino.cli.commands.v1.DebugRequest.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.commands.v1.DebugRequest.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.commands.v1.DebugRequest.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cc.arduino.cli.commands.v1.DebugRequest} returns this + */ +proto.cc.arduino.cli.commands.v1.DebugRequest.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional bool send_interrupt = 3; + * @return {boolean} + */ +proto.cc.arduino.cli.commands.v1.DebugRequest.prototype.getSendInterrupt = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cc.arduino.cli.commands.v1.DebugRequest} returns this + */ +proto.cc.arduino.cli.commands.v1.DebugRequest.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.commands.v1.GetDebugConfigRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.v1.GetDebugConfigRequest.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.v1.GetDebugConfigRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.v1.GetDebugConfigRequest.toObject = function(includeInstance, msg) { + var f, obj = { + instance: (f = msg.getInstance()) && cc_arduino_cli_commands_v1_common_pb.Instance.toObject(includeInstance, f), + fqbn: jspb.Message.getFieldWithDefault(msg, 2, ""), + sketchPath: jspb.Message.getFieldWithDefault(msg, 3, ""), + port: (f = msg.getPort()) && cc_arduino_cli_commands_v1_port_pb.Port.toObject(includeInstance, f), + interpreter: jspb.Message.getFieldWithDefault(msg, 5, ""), + 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.v1.GetDebugConfigRequest} + */ +proto.cc.arduino.cli.commands.v1.GetDebugConfigRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.v1.GetDebugConfigRequest; + return proto.cc.arduino.cli.commands.v1.GetDebugConfigRequest.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.v1.GetDebugConfigRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.v1.GetDebugConfigRequest} + */ +proto.cc.arduino.cli.commands.v1.GetDebugConfigRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cc_arduino_cli_commands_v1_common_pb.Instance; + reader.readMessage(value,cc_arduino_cli_commands_v1_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 = new cc_arduino_cli_commands_v1_port_pb.Port; + reader.readMessage(value,cc_arduino_cli_commands_v1_port_pb.Port.deserializeBinaryFromReader); + msg.setPort(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setInterpreter(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.v1.GetDebugConfigRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.v1.GetDebugConfigRequest.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.v1.GetDebugConfigRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.v1.GetDebugConfigRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInstance(); + if (f != null) { + writer.writeMessage( + 1, + f, + cc_arduino_cli_commands_v1_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 != null) { + writer.writeMessage( + 4, + f, + cc_arduino_cli_commands_v1_port_pb.Port.serializeBinaryToWriter + ); + } + f = message.getInterpreter(); + if (f.length > 0) { + writer.writeString( + 5, + 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.v1.Instance} + */ +proto.cc.arduino.cli.commands.v1.GetDebugConfigRequest.prototype.getInstance = function() { + return /** @type{?proto.cc.arduino.cli.commands.v1.Instance} */ ( + jspb.Message.getWrapperField(this, cc_arduino_cli_commands_v1_common_pb.Instance, 1)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.v1.Instance|undefined} value + * @return {!proto.cc.arduino.cli.commands.v1.GetDebugConfigRequest} returns this +*/ +proto.cc.arduino.cli.commands.v1.GetDebugConfigRequest.prototype.setInstance = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.v1.GetDebugConfigRequest} returns this + */ +proto.cc.arduino.cli.commands.v1.GetDebugConfigRequest.prototype.clearInstance = function() { + return this.setInstance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.v1.GetDebugConfigRequest.prototype.hasInstance = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string fqbn = 2; + * @return {string} + */ +proto.cc.arduino.cli.commands.v1.GetDebugConfigRequest.prototype.getFqbn = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.v1.GetDebugConfigRequest} returns this + */ +proto.cc.arduino.cli.commands.v1.GetDebugConfigRequest.prototype.setFqbn = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string sketch_path = 3; + * @return {string} + */ +proto.cc.arduino.cli.commands.v1.GetDebugConfigRequest.prototype.getSketchPath = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.v1.GetDebugConfigRequest} returns this + */ +proto.cc.arduino.cli.commands.v1.GetDebugConfigRequest.prototype.setSketchPath = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional Port port = 4; + * @return {?proto.cc.arduino.cli.commands.v1.Port} + */ +proto.cc.arduino.cli.commands.v1.GetDebugConfigRequest.prototype.getPort = function() { + return /** @type{?proto.cc.arduino.cli.commands.v1.Port} */ ( + jspb.Message.getWrapperField(this, cc_arduino_cli_commands_v1_port_pb.Port, 4)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.v1.Port|undefined} value + * @return {!proto.cc.arduino.cli.commands.v1.GetDebugConfigRequest} returns this +*/ +proto.cc.arduino.cli.commands.v1.GetDebugConfigRequest.prototype.setPort = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.v1.GetDebugConfigRequest} returns this + */ +proto.cc.arduino.cli.commands.v1.GetDebugConfigRequest.prototype.clearPort = function() { + return this.setPort(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.v1.GetDebugConfigRequest.prototype.hasPort = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional string interpreter = 5; + * @return {string} + */ +proto.cc.arduino.cli.commands.v1.GetDebugConfigRequest.prototype.getInterpreter = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.v1.GetDebugConfigRequest} returns this + */ +proto.cc.arduino.cli.commands.v1.GetDebugConfigRequest.prototype.setInterpreter = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional string import_dir = 8; + * @return {string} + */ +proto.cc.arduino.cli.commands.v1.GetDebugConfigRequest.prototype.getImportDir = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.v1.GetDebugConfigRequest} returns this + */ +proto.cc.arduino.cli.commands.v1.GetDebugConfigRequest.prototype.setImportDir = function(value) { + return jspb.Message.setProto3StringField(this, 8, value); +}; + + +/** + * optional string programmer = 9; + * @return {string} + */ +proto.cc.arduino.cli.commands.v1.GetDebugConfigRequest.prototype.getProgrammer = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.v1.GetDebugConfigRequest} returns this + */ +proto.cc.arduino.cli.commands.v1.GetDebugConfigRequest.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.v1.DebugResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.v1.DebugResponse.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.v1.DebugResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.v1.DebugResponse.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.commands.v1.DebugResponse} + */ +proto.cc.arduino.cli.commands.v1.DebugResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.v1.DebugResponse; + return proto.cc.arduino.cli.commands.v1.DebugResponse.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.v1.DebugResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.v1.DebugResponse} + */ +proto.cc.arduino.cli.commands.v1.DebugResponse.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.commands.v1.DebugResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.v1.DebugResponse.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.v1.DebugResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.v1.DebugResponse.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.commands.v1.DebugResponse.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.commands.v1.DebugResponse.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.commands.v1.DebugResponse.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cc.arduino.cli.commands.v1.DebugResponse} returns this + */ +proto.cc.arduino.cli.commands.v1.DebugResponse.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional string error = 2; + * @return {string} + */ +proto.cc.arduino.cli.commands.v1.DebugResponse.prototype.getError = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.v1.DebugResponse} returns this + */ +proto.cc.arduino.cli.commands.v1.DebugResponse.prototype.setError = 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.v1.GetDebugConfigResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.v1.GetDebugConfigResponse.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.v1.GetDebugConfigResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.v1.GetDebugConfigResponse.toObject = function(includeInstance, msg) { + var f, obj = { + executable: jspb.Message.getFieldWithDefault(msg, 1, ""), + toolchain: jspb.Message.getFieldWithDefault(msg, 2, ""), + toolchainPath: jspb.Message.getFieldWithDefault(msg, 3, ""), + toolchainPrefix: jspb.Message.getFieldWithDefault(msg, 4, ""), + server: jspb.Message.getFieldWithDefault(msg, 5, ""), + serverPath: jspb.Message.getFieldWithDefault(msg, 6, ""), + toolchainConfiguration: (f = msg.getToolchainConfiguration()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), + serverConfiguration: (f = msg.getServerConfiguration()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), + customConfigsMap: (f = msg.getCustomConfigsMap()) ? f.toObject(includeInstance, undefined) : [], + svdFile: jspb.Message.getFieldWithDefault(msg, 10, ""), + programmer: jspb.Message.getFieldWithDefault(msg, 11, "") + }; + + 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.v1.GetDebugConfigResponse} + */ +proto.cc.arduino.cli.commands.v1.GetDebugConfigResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.v1.GetDebugConfigResponse; + return proto.cc.arduino.cli.commands.v1.GetDebugConfigResponse.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.v1.GetDebugConfigResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.v1.GetDebugConfigResponse} + */ +proto.cc.arduino.cli.commands.v1.GetDebugConfigResponse.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.setExecutable(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setToolchain(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setToolchainPath(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setToolchainPrefix(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setServer(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setServerPath(value); + break; + case 7: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setToolchainConfiguration(value); + break; + case 8: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setServerConfiguration(value); + break; + case 9: + var value = msg.getCustomConfigsMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + case 10: + var value = /** @type {string} */ (reader.readString()); + msg.setSvdFile(value); + break; + case 11: + 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.v1.GetDebugConfigResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.v1.GetDebugConfigResponse.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.v1.GetDebugConfigResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.v1.GetDebugConfigResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getExecutable(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getToolchain(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getToolchainPath(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getToolchainPrefix(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getServer(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getServerPath(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getToolchainConfiguration(); + if (f != null) { + writer.writeMessage( + 7, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } + f = message.getServerConfiguration(); + if (f != null) { + writer.writeMessage( + 8, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } + f = message.getCustomConfigsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(9, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } + f = message.getSvdFile(); + if (f.length > 0) { + writer.writeString( + 10, + f + ); + } + f = message.getProgrammer(); + if (f.length > 0) { + writer.writeString( + 11, + f + ); + } +}; + + +/** + * optional string executable = 1; + * @return {string} + */ +proto.cc.arduino.cli.commands.v1.GetDebugConfigResponse.prototype.getExecutable = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.v1.GetDebugConfigResponse} returns this + */ +proto.cc.arduino.cli.commands.v1.GetDebugConfigResponse.prototype.setExecutable = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string toolchain = 2; + * @return {string} + */ +proto.cc.arduino.cli.commands.v1.GetDebugConfigResponse.prototype.getToolchain = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.v1.GetDebugConfigResponse} returns this + */ +proto.cc.arduino.cli.commands.v1.GetDebugConfigResponse.prototype.setToolchain = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string toolchain_path = 3; + * @return {string} + */ +proto.cc.arduino.cli.commands.v1.GetDebugConfigResponse.prototype.getToolchainPath = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.v1.GetDebugConfigResponse} returns this + */ +proto.cc.arduino.cli.commands.v1.GetDebugConfigResponse.prototype.setToolchainPath = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string toolchain_prefix = 4; + * @return {string} + */ +proto.cc.arduino.cli.commands.v1.GetDebugConfigResponse.prototype.getToolchainPrefix = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.v1.GetDebugConfigResponse} returns this + */ +proto.cc.arduino.cli.commands.v1.GetDebugConfigResponse.prototype.setToolchainPrefix = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string server = 5; + * @return {string} + */ +proto.cc.arduino.cli.commands.v1.GetDebugConfigResponse.prototype.getServer = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.v1.GetDebugConfigResponse} returns this + */ +proto.cc.arduino.cli.commands.v1.GetDebugConfigResponse.prototype.setServer = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional string server_path = 6; + * @return {string} + */ +proto.cc.arduino.cli.commands.v1.GetDebugConfigResponse.prototype.getServerPath = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.v1.GetDebugConfigResponse} returns this + */ +proto.cc.arduino.cli.commands.v1.GetDebugConfigResponse.prototype.setServerPath = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional google.protobuf.Any toolchain_configuration = 7; + * @return {?proto.google.protobuf.Any} + */ +proto.cc.arduino.cli.commands.v1.GetDebugConfigResponse.prototype.getToolchainConfiguration = function() { + return /** @type{?proto.google.protobuf.Any} */ ( + jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 7)); +}; + + +/** + * @param {?proto.google.protobuf.Any|undefined} value + * @return {!proto.cc.arduino.cli.commands.v1.GetDebugConfigResponse} returns this +*/ +proto.cc.arduino.cli.commands.v1.GetDebugConfigResponse.prototype.setToolchainConfiguration = function(value) { + return jspb.Message.setWrapperField(this, 7, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.v1.GetDebugConfigResponse} returns this + */ +proto.cc.arduino.cli.commands.v1.GetDebugConfigResponse.prototype.clearToolchainConfiguration = function() { + return this.setToolchainConfiguration(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.v1.GetDebugConfigResponse.prototype.hasToolchainConfiguration = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional google.protobuf.Any server_configuration = 8; + * @return {?proto.google.protobuf.Any} + */ +proto.cc.arduino.cli.commands.v1.GetDebugConfigResponse.prototype.getServerConfiguration = function() { + return /** @type{?proto.google.protobuf.Any} */ ( + jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 8)); +}; + + +/** + * @param {?proto.google.protobuf.Any|undefined} value + * @return {!proto.cc.arduino.cli.commands.v1.GetDebugConfigResponse} returns this +*/ +proto.cc.arduino.cli.commands.v1.GetDebugConfigResponse.prototype.setServerConfiguration = function(value) { + return jspb.Message.setWrapperField(this, 8, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.v1.GetDebugConfigResponse} returns this + */ +proto.cc.arduino.cli.commands.v1.GetDebugConfigResponse.prototype.clearServerConfiguration = function() { + return this.setServerConfiguration(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.v1.GetDebugConfigResponse.prototype.hasServerConfiguration = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * map custom_configs = 9; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.cc.arduino.cli.commands.v1.GetDebugConfigResponse.prototype.getCustomConfigsMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 9, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.cc.arduino.cli.commands.v1.GetDebugConfigResponse} returns this + */ +proto.cc.arduino.cli.commands.v1.GetDebugConfigResponse.prototype.clearCustomConfigsMap = function() { + this.getCustomConfigsMap().clear(); + return this;}; + + +/** + * optional string svd_file = 10; + * @return {string} + */ +proto.cc.arduino.cli.commands.v1.GetDebugConfigResponse.prototype.getSvdFile = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.v1.GetDebugConfigResponse} returns this + */ +proto.cc.arduino.cli.commands.v1.GetDebugConfigResponse.prototype.setSvdFile = function(value) { + return jspb.Message.setProto3StringField(this, 10, value); +}; + + +/** + * optional string programmer = 11; + * @return {string} + */ +proto.cc.arduino.cli.commands.v1.GetDebugConfigResponse.prototype.getProgrammer = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.v1.GetDebugConfigResponse} returns this + */ +proto.cc.arduino.cli.commands.v1.GetDebugConfigResponse.prototype.setProgrammer = function(value) { + return jspb.Message.setProto3StringField(this, 11, 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.v1.DebugGCCToolchainConfiguration.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.v1.DebugGCCToolchainConfiguration.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.v1.DebugGCCToolchainConfiguration} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.v1.DebugGCCToolchainConfiguration.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.v1.DebugGCCToolchainConfiguration} + */ +proto.cc.arduino.cli.commands.v1.DebugGCCToolchainConfiguration.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.v1.DebugGCCToolchainConfiguration; + return proto.cc.arduino.cli.commands.v1.DebugGCCToolchainConfiguration.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.v1.DebugGCCToolchainConfiguration} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.v1.DebugGCCToolchainConfiguration} + */ +proto.cc.arduino.cli.commands.v1.DebugGCCToolchainConfiguration.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.v1.DebugGCCToolchainConfiguration.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.v1.DebugGCCToolchainConfiguration.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.v1.DebugGCCToolchainConfiguration} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.v1.DebugGCCToolchainConfiguration.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cc.arduino.cli.commands.v1.DebugOpenOCDServerConfiguration.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.v1.DebugOpenOCDServerConfiguration.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.v1.DebugOpenOCDServerConfiguration.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.v1.DebugOpenOCDServerConfiguration} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.v1.DebugOpenOCDServerConfiguration.toObject = function(includeInstance, msg) { + var f, obj = { + path: jspb.Message.getFieldWithDefault(msg, 1, ""), + scriptsDir: jspb.Message.getFieldWithDefault(msg, 2, ""), + scriptsList: (f = jspb.Message.getRepeatedField(msg, 3)) == 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.v1.DebugOpenOCDServerConfiguration} + */ +proto.cc.arduino.cli.commands.v1.DebugOpenOCDServerConfiguration.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.v1.DebugOpenOCDServerConfiguration; + return proto.cc.arduino.cli.commands.v1.DebugOpenOCDServerConfiguration.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.v1.DebugOpenOCDServerConfiguration} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.v1.DebugOpenOCDServerConfiguration} + */ +proto.cc.arduino.cli.commands.v1.DebugOpenOCDServerConfiguration.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.setPath(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setScriptsDir(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.addScripts(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.v1.DebugOpenOCDServerConfiguration.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.v1.DebugOpenOCDServerConfiguration.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.v1.DebugOpenOCDServerConfiguration} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.v1.DebugOpenOCDServerConfiguration.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPath(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getScriptsDir(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getScriptsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 3, + f + ); + } +}; + + +/** + * optional string path = 1; + * @return {string} + */ +proto.cc.arduino.cli.commands.v1.DebugOpenOCDServerConfiguration.prototype.getPath = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.v1.DebugOpenOCDServerConfiguration} returns this + */ +proto.cc.arduino.cli.commands.v1.DebugOpenOCDServerConfiguration.prototype.setPath = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string scripts_dir = 2; + * @return {string} + */ +proto.cc.arduino.cli.commands.v1.DebugOpenOCDServerConfiguration.prototype.getScriptsDir = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.v1.DebugOpenOCDServerConfiguration} returns this + */ +proto.cc.arduino.cli.commands.v1.DebugOpenOCDServerConfiguration.prototype.setScriptsDir = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated string scripts = 3; + * @return {!Array} + */ +proto.cc.arduino.cli.commands.v1.DebugOpenOCDServerConfiguration.prototype.getScriptsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cc.arduino.cli.commands.v1.DebugOpenOCDServerConfiguration} returns this + */ +proto.cc.arduino.cli.commands.v1.DebugOpenOCDServerConfiguration.prototype.setScriptsList = function(value) { + return jspb.Message.setField(this, 3, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.cc.arduino.cli.commands.v1.DebugOpenOCDServerConfiguration} returns this + */ +proto.cc.arduino.cli.commands.v1.DebugOpenOCDServerConfiguration.prototype.addScripts = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 3, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cc.arduino.cli.commands.v1.DebugOpenOCDServerConfiguration} returns this + */ +proto.cc.arduino.cli.commands.v1.DebugOpenOCDServerConfiguration.prototype.clearScriptsList = function() { + return this.setScriptsList([]); +}; + + +goog.object.extend(exports, proto.cc.arduino.cli.commands.v1); diff --git a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/debug/v1/debug_grpc_pb.d.ts b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/debug/v1/debug_grpc_pb.d.ts deleted file mode 100644 index a5e384a95..000000000 --- a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/debug/v1/debug_grpc_pb.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -// package: cc.arduino.cli.debug.v1 -// file: cc/arduino/cli/debug/v1/debug.proto - -/* tslint:disable */ -/* eslint-disable */ - -import * as grpc from "@grpc/grpc-js"; -import * as cc_arduino_cli_debug_v1_debug_pb from "../../../../../cc/arduino/cli/debug/v1/debug_pb"; -import * as cc_arduino_cli_commands_v1_common_pb from "../../../../../cc/arduino/cli/commands/v1/common_pb"; -import * as cc_arduino_cli_commands_v1_port_pb from "../../../../../cc/arduino/cli/commands/v1/port_pb"; - -interface IDebugServiceService extends grpc.ServiceDefinition { - debug: IDebugServiceService_IDebug; - getDebugConfig: IDebugServiceService_IGetDebugConfig; -} - -interface IDebugServiceService_IDebug extends grpc.MethodDefinition { - path: "/cc.arduino.cli.debug.v1.DebugService/Debug"; - requestStream: true; - responseStream: true; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IDebugServiceService_IGetDebugConfig extends grpc.MethodDefinition { - path: "/cc.arduino.cli.debug.v1.DebugService/GetDebugConfig"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} - -export const DebugServiceService: IDebugServiceService; - -export interface IDebugServiceServer extends grpc.UntypedServiceImplementation { - debug: grpc.handleBidiStreamingCall; - getDebugConfig: grpc.handleUnaryCall; -} - -export interface IDebugServiceClient { - debug(): grpc.ClientDuplexStream; - debug(options: Partial): grpc.ClientDuplexStream; - debug(metadata: grpc.Metadata, options?: Partial): grpc.ClientDuplexStream; - getDebugConfig(request: cc_arduino_cli_debug_v1_debug_pb.DebugConfigRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_debug_v1_debug_pb.GetDebugConfigResponse) => void): grpc.ClientUnaryCall; - getDebugConfig(request: cc_arduino_cli_debug_v1_debug_pb.DebugConfigRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_debug_v1_debug_pb.GetDebugConfigResponse) => void): grpc.ClientUnaryCall; - getDebugConfig(request: cc_arduino_cli_debug_v1_debug_pb.DebugConfigRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_debug_v1_debug_pb.GetDebugConfigResponse) => void): grpc.ClientUnaryCall; -} - -export class DebugServiceClient extends grpc.Client implements IDebugServiceClient { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: Partial); - public debug(options?: Partial): grpc.ClientDuplexStream; - public debug(metadata?: grpc.Metadata, options?: Partial): grpc.ClientDuplexStream; - public getDebugConfig(request: cc_arduino_cli_debug_v1_debug_pb.DebugConfigRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_debug_v1_debug_pb.GetDebugConfigResponse) => void): grpc.ClientUnaryCall; - public getDebugConfig(request: cc_arduino_cli_debug_v1_debug_pb.DebugConfigRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_debug_v1_debug_pb.GetDebugConfigResponse) => void): grpc.ClientUnaryCall; - public getDebugConfig(request: cc_arduino_cli_debug_v1_debug_pb.DebugConfigRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_debug_v1_debug_pb.GetDebugConfigResponse) => void): grpc.ClientUnaryCall; -} diff --git a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/debug/v1/debug_grpc_pb.js b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/debug/v1/debug_grpc_pb.js deleted file mode 100644 index 829ca77d3..000000000 --- a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/debug/v1/debug_grpc_pb.js +++ /dev/null @@ -1,95 +0,0 @@ -// 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 cc_arduino_cli_debug_v1_debug_pb = require('../../../../../cc/arduino/cli/debug/v1/debug_pb.js'); -var cc_arduino_cli_commands_v1_common_pb = require('../../../../../cc/arduino/cli/commands/v1/common_pb.js'); -var cc_arduino_cli_commands_v1_port_pb = require('../../../../../cc/arduino/cli/commands/v1/port_pb.js'); - -function serialize_cc_arduino_cli_debug_v1_DebugConfigRequest(arg) { - if (!(arg instanceof cc_arduino_cli_debug_v1_debug_pb.DebugConfigRequest)) { - throw new Error('Expected argument of type cc.arduino.cli.debug.v1.DebugConfigRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_debug_v1_DebugConfigRequest(buffer_arg) { - return cc_arduino_cli_debug_v1_debug_pb.DebugConfigRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_cc_arduino_cli_debug_v1_DebugRequest(arg) { - if (!(arg instanceof cc_arduino_cli_debug_v1_debug_pb.DebugRequest)) { - throw new Error('Expected argument of type cc.arduino.cli.debug.v1.DebugRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_debug_v1_DebugRequest(buffer_arg) { - return cc_arduino_cli_debug_v1_debug_pb.DebugRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_cc_arduino_cli_debug_v1_DebugResponse(arg) { - if (!(arg instanceof cc_arduino_cli_debug_v1_debug_pb.DebugResponse)) { - throw new Error('Expected argument of type cc.arduino.cli.debug.v1.DebugResponse'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_debug_v1_DebugResponse(buffer_arg) { - return cc_arduino_cli_debug_v1_debug_pb.DebugResponse.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_cc_arduino_cli_debug_v1_GetDebugConfigResponse(arg) { - if (!(arg instanceof cc_arduino_cli_debug_v1_debug_pb.GetDebugConfigResponse)) { - throw new Error('Expected argument of type cc.arduino.cli.debug.v1.GetDebugConfigResponse'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_debug_v1_GetDebugConfigResponse(buffer_arg) { - return cc_arduino_cli_debug_v1_debug_pb.GetDebugConfigResponse.deserializeBinary(new Uint8Array(buffer_arg)); -} - - -// DebugService abstracts a debug Session usage -var DebugServiceService = exports['cc.arduino.cli.debug.v1.DebugService'] = { - // Start a debug session and communicate with the debugger tool. -debug: { - path: '/cc.arduino.cli.debug.v1.DebugService/Debug', - requestStream: true, - responseStream: true, - requestType: cc_arduino_cli_debug_v1_debug_pb.DebugRequest, - responseType: cc_arduino_cli_debug_v1_debug_pb.DebugResponse, - requestSerialize: serialize_cc_arduino_cli_debug_v1_DebugRequest, - requestDeserialize: deserialize_cc_arduino_cli_debug_v1_DebugRequest, - responseSerialize: serialize_cc_arduino_cli_debug_v1_DebugResponse, - responseDeserialize: deserialize_cc_arduino_cli_debug_v1_DebugResponse, - }, - getDebugConfig: { - path: '/cc.arduino.cli.debug.v1.DebugService/GetDebugConfig', - requestStream: false, - responseStream: false, - requestType: cc_arduino_cli_debug_v1_debug_pb.DebugConfigRequest, - responseType: cc_arduino_cli_debug_v1_debug_pb.GetDebugConfigResponse, - requestSerialize: serialize_cc_arduino_cli_debug_v1_DebugConfigRequest, - requestDeserialize: deserialize_cc_arduino_cli_debug_v1_DebugConfigRequest, - responseSerialize: serialize_cc_arduino_cli_debug_v1_GetDebugConfigResponse, - responseDeserialize: deserialize_cc_arduino_cli_debug_v1_GetDebugConfigResponse, - }, -}; - diff --git a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/debug/v1/debug_pb.js b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/debug/v1/debug_pb.js deleted file mode 100644 index 136919afe..000000000 --- a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/debug/v1/debug_pb.js +++ /dev/null @@ -1,1233 +0,0 @@ -// source: cc/arduino/cli/debug/v1/debug.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @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! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = (function() { - if (this) { return this; } - if (typeof window !== 'undefined') { return window; } - if (typeof global !== 'undefined') { return global; } - if (typeof self !== 'undefined') { return self; } - return Function('return this')(); -}.call(null)); - -var cc_arduino_cli_commands_v1_common_pb = require('../../../../../cc/arduino/cli/commands/v1/common_pb.js'); -goog.object.extend(proto, cc_arduino_cli_commands_v1_common_pb); -var cc_arduino_cli_commands_v1_port_pb = require('../../../../../cc/arduino/cli/commands/v1/port_pb.js'); -goog.object.extend(proto, cc_arduino_cli_commands_v1_port_pb); -goog.exportSymbol('proto.cc.arduino.cli.debug.v1.DebugConfigRequest', null, global); -goog.exportSymbol('proto.cc.arduino.cli.debug.v1.DebugRequest', null, global); -goog.exportSymbol('proto.cc.arduino.cli.debug.v1.DebugResponse', null, global); -goog.exportSymbol('proto.cc.arduino.cli.debug.v1.GetDebugConfigResponse', 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.v1.DebugRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.debug.v1.DebugRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.cc.arduino.cli.debug.v1.DebugRequest.displayName = 'proto.cc.arduino.cli.debug.v1.DebugRequest'; -} -/** - * 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.v1.DebugConfigRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.debug.v1.DebugConfigRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.cc.arduino.cli.debug.v1.DebugConfigRequest.displayName = 'proto.cc.arduino.cli.debug.v1.DebugConfigRequest'; -} -/** - * 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.v1.DebugResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.debug.v1.DebugResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.cc.arduino.cli.debug.v1.DebugResponse.displayName = 'proto.cc.arduino.cli.debug.v1.DebugResponse'; -} -/** - * 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.v1.GetDebugConfigResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.debug.v1.GetDebugConfigResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.cc.arduino.cli.debug.v1.GetDebugConfigResponse.displayName = 'proto.cc.arduino.cli.debug.v1.GetDebugConfigResponse'; -} - - - -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.v1.DebugRequest.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.debug.v1.DebugRequest.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.v1.DebugRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.debug.v1.DebugRequest.toObject = function(includeInstance, msg) { - var f, obj = { - debugRequest: (f = msg.getDebugRequest()) && proto.cc.arduino.cli.debug.v1.DebugConfigRequest.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.v1.DebugRequest} - */ -proto.cc.arduino.cli.debug.v1.DebugRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.debug.v1.DebugRequest; - return proto.cc.arduino.cli.debug.v1.DebugRequest.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.v1.DebugRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.debug.v1.DebugRequest} - */ -proto.cc.arduino.cli.debug.v1.DebugRequest.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.v1.DebugConfigRequest; - reader.readMessage(value,proto.cc.arduino.cli.debug.v1.DebugConfigRequest.deserializeBinaryFromReader); - msg.setDebugRequest(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.v1.DebugRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.debug.v1.DebugRequest.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.v1.DebugRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.debug.v1.DebugRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getDebugRequest(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.cc.arduino.cli.debug.v1.DebugConfigRequest.serializeBinaryToWriter - ); - } - f = message.getData_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getSendInterrupt(); - if (f) { - writer.writeBool( - 3, - f - ); - } -}; - - -/** - * optional DebugConfigRequest debug_request = 1; - * @return {?proto.cc.arduino.cli.debug.v1.DebugConfigRequest} - */ -proto.cc.arduino.cli.debug.v1.DebugRequest.prototype.getDebugRequest = function() { - return /** @type{?proto.cc.arduino.cli.debug.v1.DebugConfigRequest} */ ( - jspb.Message.getWrapperField(this, proto.cc.arduino.cli.debug.v1.DebugConfigRequest, 1)); -}; - - -/** - * @param {?proto.cc.arduino.cli.debug.v1.DebugConfigRequest|undefined} value - * @return {!proto.cc.arduino.cli.debug.v1.DebugRequest} returns this -*/ -proto.cc.arduino.cli.debug.v1.DebugRequest.prototype.setDebugRequest = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.cc.arduino.cli.debug.v1.DebugRequest} returns this - */ -proto.cc.arduino.cli.debug.v1.DebugRequest.prototype.clearDebugRequest = function() { - return this.setDebugRequest(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cc.arduino.cli.debug.v1.DebugRequest.prototype.hasDebugRequest = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bytes data = 2; - * @return {!(string|Uint8Array)} - */ -proto.cc.arduino.cli.debug.v1.DebugRequest.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.v1.DebugRequest.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.v1.DebugRequest.prototype.getData_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getData())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.cc.arduino.cli.debug.v1.DebugRequest} returns this - */ -proto.cc.arduino.cli.debug.v1.DebugRequest.prototype.setData = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional bool send_interrupt = 3; - * @return {boolean} - */ -proto.cc.arduino.cli.debug.v1.DebugRequest.prototype.getSendInterrupt = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.cc.arduino.cli.debug.v1.DebugRequest} returns this - */ -proto.cc.arduino.cli.debug.v1.DebugRequest.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.v1.DebugConfigRequest.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.debug.v1.DebugConfigRequest.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.v1.DebugConfigRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.debug.v1.DebugConfigRequest.toObject = function(includeInstance, msg) { - var f, obj = { - instance: (f = msg.getInstance()) && cc_arduino_cli_commands_v1_common_pb.Instance.toObject(includeInstance, f), - fqbn: jspb.Message.getFieldWithDefault(msg, 2, ""), - sketchPath: jspb.Message.getFieldWithDefault(msg, 3, ""), - port: (f = msg.getPort()) && cc_arduino_cli_commands_v1_port_pb.Port.toObject(includeInstance, f), - interpreter: jspb.Message.getFieldWithDefault(msg, 5, ""), - 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.debug.v1.DebugConfigRequest} - */ -proto.cc.arduino.cli.debug.v1.DebugConfigRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.debug.v1.DebugConfigRequest; - return proto.cc.arduino.cli.debug.v1.DebugConfigRequest.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.v1.DebugConfigRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.debug.v1.DebugConfigRequest} - */ -proto.cc.arduino.cli.debug.v1.DebugConfigRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new cc_arduino_cli_commands_v1_common_pb.Instance; - reader.readMessage(value,cc_arduino_cli_commands_v1_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 = new cc_arduino_cli_commands_v1_port_pb.Port; - reader.readMessage(value,cc_arduino_cli_commands_v1_port_pb.Port.deserializeBinaryFromReader); - msg.setPort(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setInterpreter(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.debug.v1.DebugConfigRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.debug.v1.DebugConfigRequest.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.v1.DebugConfigRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.debug.v1.DebugConfigRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getInstance(); - if (f != null) { - writer.writeMessage( - 1, - f, - cc_arduino_cli_commands_v1_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 != null) { - writer.writeMessage( - 4, - f, - cc_arduino_cli_commands_v1_port_pb.Port.serializeBinaryToWriter - ); - } - f = message.getInterpreter(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } - f = message.getImportDir(); - if (f.length > 0) { - writer.writeString( - 8, - f - ); - } - f = message.getProgrammer(); - if (f.length > 0) { - writer.writeString( - 9, - f - ); - } -}; - - -/** - * optional cc.arduino.cli.commands.v1.Instance instance = 1; - * @return {?proto.cc.arduino.cli.commands.v1.Instance} - */ -proto.cc.arduino.cli.debug.v1.DebugConfigRequest.prototype.getInstance = function() { - return /** @type{?proto.cc.arduino.cli.commands.v1.Instance} */ ( - jspb.Message.getWrapperField(this, cc_arduino_cli_commands_v1_common_pb.Instance, 1)); -}; - - -/** - * @param {?proto.cc.arduino.cli.commands.v1.Instance|undefined} value - * @return {!proto.cc.arduino.cli.debug.v1.DebugConfigRequest} returns this -*/ -proto.cc.arduino.cli.debug.v1.DebugConfigRequest.prototype.setInstance = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.cc.arduino.cli.debug.v1.DebugConfigRequest} returns this - */ -proto.cc.arduino.cli.debug.v1.DebugConfigRequest.prototype.clearInstance = function() { - return this.setInstance(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cc.arduino.cli.debug.v1.DebugConfigRequest.prototype.hasInstance = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional string fqbn = 2; - * @return {string} - */ -proto.cc.arduino.cli.debug.v1.DebugConfigRequest.prototype.getFqbn = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.cc.arduino.cli.debug.v1.DebugConfigRequest} returns this - */ -proto.cc.arduino.cli.debug.v1.DebugConfigRequest.prototype.setFqbn = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string sketch_path = 3; - * @return {string} - */ -proto.cc.arduino.cli.debug.v1.DebugConfigRequest.prototype.getSketchPath = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.cc.arduino.cli.debug.v1.DebugConfigRequest} returns this - */ -proto.cc.arduino.cli.debug.v1.DebugConfigRequest.prototype.setSketchPath = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional cc.arduino.cli.commands.v1.Port port = 4; - * @return {?proto.cc.arduino.cli.commands.v1.Port} - */ -proto.cc.arduino.cli.debug.v1.DebugConfigRequest.prototype.getPort = function() { - return /** @type{?proto.cc.arduino.cli.commands.v1.Port} */ ( - jspb.Message.getWrapperField(this, cc_arduino_cli_commands_v1_port_pb.Port, 4)); -}; - - -/** - * @param {?proto.cc.arduino.cli.commands.v1.Port|undefined} value - * @return {!proto.cc.arduino.cli.debug.v1.DebugConfigRequest} returns this -*/ -proto.cc.arduino.cli.debug.v1.DebugConfigRequest.prototype.setPort = function(value) { - return jspb.Message.setWrapperField(this, 4, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.cc.arduino.cli.debug.v1.DebugConfigRequest} returns this - */ -proto.cc.arduino.cli.debug.v1.DebugConfigRequest.prototype.clearPort = function() { - return this.setPort(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cc.arduino.cli.debug.v1.DebugConfigRequest.prototype.hasPort = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * optional string interpreter = 5; - * @return {string} - */ -proto.cc.arduino.cli.debug.v1.DebugConfigRequest.prototype.getInterpreter = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * @param {string} value - * @return {!proto.cc.arduino.cli.debug.v1.DebugConfigRequest} returns this - */ -proto.cc.arduino.cli.debug.v1.DebugConfigRequest.prototype.setInterpreter = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); -}; - - -/** - * optional string import_dir = 8; - * @return {string} - */ -proto.cc.arduino.cli.debug.v1.DebugConfigRequest.prototype.getImportDir = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); -}; - - -/** - * @param {string} value - * @return {!proto.cc.arduino.cli.debug.v1.DebugConfigRequest} returns this - */ -proto.cc.arduino.cli.debug.v1.DebugConfigRequest.prototype.setImportDir = function(value) { - return jspb.Message.setProto3StringField(this, 8, value); -}; - - -/** - * optional string programmer = 9; - * @return {string} - */ -proto.cc.arduino.cli.debug.v1.DebugConfigRequest.prototype.getProgrammer = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); -}; - - -/** - * @param {string} value - * @return {!proto.cc.arduino.cli.debug.v1.DebugConfigRequest} returns this - */ -proto.cc.arduino.cli.debug.v1.DebugConfigRequest.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.debug.v1.DebugResponse.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.debug.v1.DebugResponse.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.v1.DebugResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.debug.v1.DebugResponse.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.v1.DebugResponse} - */ -proto.cc.arduino.cli.debug.v1.DebugResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.debug.v1.DebugResponse; - return proto.cc.arduino.cli.debug.v1.DebugResponse.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.v1.DebugResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.debug.v1.DebugResponse} - */ -proto.cc.arduino.cli.debug.v1.DebugResponse.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.v1.DebugResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.debug.v1.DebugResponse.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.v1.DebugResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.debug.v1.DebugResponse.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.v1.DebugResponse.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.v1.DebugResponse.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.v1.DebugResponse.prototype.getData_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getData())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.cc.arduino.cli.debug.v1.DebugResponse} returns this - */ -proto.cc.arduino.cli.debug.v1.DebugResponse.prototype.setData = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional string error = 2; - * @return {string} - */ -proto.cc.arduino.cli.debug.v1.DebugResponse.prototype.getError = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.cc.arduino.cli.debug.v1.DebugResponse} returns this - */ -proto.cc.arduino.cli.debug.v1.DebugResponse.prototype.setError = 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.debug.v1.GetDebugConfigResponse.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.debug.v1.GetDebugConfigResponse.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.v1.GetDebugConfigResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.debug.v1.GetDebugConfigResponse.toObject = function(includeInstance, msg) { - var f, obj = { - executable: jspb.Message.getFieldWithDefault(msg, 1, ""), - toolchain: jspb.Message.getFieldWithDefault(msg, 2, ""), - toolchainPath: jspb.Message.getFieldWithDefault(msg, 3, ""), - toolchainPrefix: jspb.Message.getFieldWithDefault(msg, 4, ""), - server: jspb.Message.getFieldWithDefault(msg, 5, ""), - serverPath: jspb.Message.getFieldWithDefault(msg, 6, ""), - toolchainConfigurationMap: (f = msg.getToolchainConfigurationMap()) ? f.toObject(includeInstance, undefined) : [], - serverConfigurationMap: (f = msg.getServerConfigurationMap()) ? f.toObject(includeInstance, undefined) : [] - }; - - 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.v1.GetDebugConfigResponse} - */ -proto.cc.arduino.cli.debug.v1.GetDebugConfigResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.debug.v1.GetDebugConfigResponse; - return proto.cc.arduino.cli.debug.v1.GetDebugConfigResponse.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.v1.GetDebugConfigResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.debug.v1.GetDebugConfigResponse} - */ -proto.cc.arduino.cli.debug.v1.GetDebugConfigResponse.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.setExecutable(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setToolchain(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setToolchainPath(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setToolchainPrefix(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setServer(value); - break; - case 6: - var value = /** @type {string} */ (reader.readString()); - msg.setServerPath(value); - break; - case 7: - var value = msg.getToolchainConfigurationMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); - }); - break; - case 8: - var value = msg.getServerConfigurationMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); - }); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.cc.arduino.cli.debug.v1.GetDebugConfigResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.debug.v1.GetDebugConfigResponse.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.v1.GetDebugConfigResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.debug.v1.GetDebugConfigResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getExecutable(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getToolchain(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getToolchainPath(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getToolchainPrefix(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } - f = message.getServer(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } - f = message.getServerPath(); - if (f.length > 0) { - writer.writeString( - 6, - f - ); - } - f = message.getToolchainConfigurationMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(7, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); - } - f = message.getServerConfigurationMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(8, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); - } -}; - - -/** - * optional string executable = 1; - * @return {string} - */ -proto.cc.arduino.cli.debug.v1.GetDebugConfigResponse.prototype.getExecutable = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.cc.arduino.cli.debug.v1.GetDebugConfigResponse} returns this - */ -proto.cc.arduino.cli.debug.v1.GetDebugConfigResponse.prototype.setExecutable = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string toolchain = 2; - * @return {string} - */ -proto.cc.arduino.cli.debug.v1.GetDebugConfigResponse.prototype.getToolchain = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.cc.arduino.cli.debug.v1.GetDebugConfigResponse} returns this - */ -proto.cc.arduino.cli.debug.v1.GetDebugConfigResponse.prototype.setToolchain = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string toolchain_path = 3; - * @return {string} - */ -proto.cc.arduino.cli.debug.v1.GetDebugConfigResponse.prototype.getToolchainPath = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.cc.arduino.cli.debug.v1.GetDebugConfigResponse} returns this - */ -proto.cc.arduino.cli.debug.v1.GetDebugConfigResponse.prototype.setToolchainPath = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional string toolchain_prefix = 4; - * @return {string} - */ -proto.cc.arduino.cli.debug.v1.GetDebugConfigResponse.prototype.getToolchainPrefix = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.cc.arduino.cli.debug.v1.GetDebugConfigResponse} returns this - */ -proto.cc.arduino.cli.debug.v1.GetDebugConfigResponse.prototype.setToolchainPrefix = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - -/** - * optional string server = 5; - * @return {string} - */ -proto.cc.arduino.cli.debug.v1.GetDebugConfigResponse.prototype.getServer = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * @param {string} value - * @return {!proto.cc.arduino.cli.debug.v1.GetDebugConfigResponse} returns this - */ -proto.cc.arduino.cli.debug.v1.GetDebugConfigResponse.prototype.setServer = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); -}; - - -/** - * optional string server_path = 6; - * @return {string} - */ -proto.cc.arduino.cli.debug.v1.GetDebugConfigResponse.prototype.getServerPath = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); -}; - - -/** - * @param {string} value - * @return {!proto.cc.arduino.cli.debug.v1.GetDebugConfigResponse} returns this - */ -proto.cc.arduino.cli.debug.v1.GetDebugConfigResponse.prototype.setServerPath = function(value) { - return jspb.Message.setProto3StringField(this, 6, value); -}; - - -/** - * map toolchain_configuration = 7; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.cc.arduino.cli.debug.v1.GetDebugConfigResponse.prototype.getToolchainConfigurationMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 7, opt_noLazyCreate, - null)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.cc.arduino.cli.debug.v1.GetDebugConfigResponse} returns this - */ -proto.cc.arduino.cli.debug.v1.GetDebugConfigResponse.prototype.clearToolchainConfigurationMap = function() { - this.getToolchainConfigurationMap().clear(); - return this;}; - - -/** - * map server_configuration = 8; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.cc.arduino.cli.debug.v1.GetDebugConfigResponse.prototype.getServerConfigurationMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 8, opt_noLazyCreate, - null)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.cc.arduino.cli.debug.v1.GetDebugConfigResponse} returns this - */ -proto.cc.arduino.cli.debug.v1.GetDebugConfigResponse.prototype.clearServerConfigurationMap = function() { - this.getServerConfigurationMap().clear(); - return this;}; - - -goog.object.extend(exports, proto.cc.arduino.cli.debug.v1); diff --git a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/monitor/v1/monitor_grpc_pb.d.ts b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/monitor/v1/monitor_grpc_pb.d.ts deleted file mode 100644 index 981a1da92..000000000 --- a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/monitor/v1/monitor_grpc_pb.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -// package: cc.arduino.cli.monitor.v1 -// file: cc/arduino/cli/monitor/v1/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 cc_arduino_cli_monitor_v1_monitor_pb from "../../../../../cc/arduino/cli/monitor/v1/monitor_pb"; -import * as google_protobuf_struct_pb from "google-protobuf/google/protobuf/struct_pb"; - -interface IMonitorServiceService extends grpc.ServiceDefinition { - streamingOpen: IMonitorServiceService_IStreamingOpen; -} - -interface IMonitorServiceService_IStreamingOpen extends grpc.MethodDefinition { - path: "/cc.arduino.cli.monitor.v1.MonitorService/StreamingOpen"; - requestStream: true; - responseStream: true; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} - -export const MonitorServiceService: IMonitorServiceService; - -export interface IMonitorServiceServer { - streamingOpen: grpc.handleBidiStreamingCall; -} - -export interface IMonitorServiceClient { - streamingOpen(): grpc.ClientDuplexStream; - streamingOpen(options: Partial): grpc.ClientDuplexStream; - streamingOpen(metadata: grpc.Metadata, options?: Partial): grpc.ClientDuplexStream; -} - -export class MonitorServiceClient extends grpc.Client implements IMonitorServiceClient { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: Partial); - 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/cc/arduino/cli/monitor/v1/monitor_grpc_pb.js b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/monitor/v1/monitor_grpc_pb.js deleted file mode 100644 index f20982617..000000000 --- a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/monitor/v1/monitor_grpc_pb.js +++ /dev/null @@ -1,65 +0,0 @@ -// 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 cc_arduino_cli_monitor_v1_monitor_pb = require('../../../../../cc/arduino/cli/monitor/v1/monitor_pb.js'); -var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js'); - -function serialize_cc_arduino_cli_monitor_v1_StreamingOpenRequest(arg) { - if (!(arg instanceof cc_arduino_cli_monitor_v1_monitor_pb.StreamingOpenRequest)) { - throw new Error('Expected argument of type cc.arduino.cli.monitor.v1.StreamingOpenRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_monitor_v1_StreamingOpenRequest(buffer_arg) { - return cc_arduino_cli_monitor_v1_monitor_pb.StreamingOpenRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_cc_arduino_cli_monitor_v1_StreamingOpenResponse(arg) { - if (!(arg instanceof cc_arduino_cli_monitor_v1_monitor_pb.StreamingOpenResponse)) { - throw new Error('Expected argument of type cc.arduino.cli.monitor.v1.StreamingOpenResponse'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_monitor_v1_StreamingOpenResponse(buffer_arg) { - return cc_arduino_cli_monitor_v1_monitor_pb.StreamingOpenResponse.deserializeBinary(new Uint8Array(buffer_arg)); -} - - -// MonitorService provides services for boards monitor. -// DEPRECATION WARNING: MonitorService is deprecated and will be removed in a -// future release. Use ArduinoCoreService.Monitor and -// ArduinoCoreService.EnumerateMonitorPortSettings instead. -var MonitorServiceService = exports['cc.arduino.cli.monitor.v1.MonitorService'] = { - // 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.v1.MonitorService/StreamingOpen', - requestStream: true, - responseStream: true, - requestType: cc_arduino_cli_monitor_v1_monitor_pb.StreamingOpenRequest, - responseType: cc_arduino_cli_monitor_v1_monitor_pb.StreamingOpenResponse, - requestSerialize: serialize_cc_arduino_cli_monitor_v1_StreamingOpenRequest, - requestDeserialize: deserialize_cc_arduino_cli_monitor_v1_StreamingOpenRequest, - responseSerialize: serialize_cc_arduino_cli_monitor_v1_StreamingOpenResponse, - responseDeserialize: deserialize_cc_arduino_cli_monitor_v1_StreamingOpenResponse, - }, -}; - diff --git a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/monitor/v1/monitor_pb.d.ts b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/monitor/v1/monitor_pb.d.ts deleted file mode 100644 index 9d158dd24..000000000 --- a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/monitor/v1/monitor_pb.d.ts +++ /dev/null @@ -1,131 +0,0 @@ -// package: cc.arduino.cli.monitor.v1 -// file: cc/arduino/cli/monitor/v1/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 StreamingOpenRequest extends jspb.Message { - - hasConfig(): boolean; - clearConfig(): void; - getConfig(): MonitorConfig | undefined; - setConfig(value?: MonitorConfig): StreamingOpenRequest; - - - hasData(): boolean; - clearData(): void; - getData(): Uint8Array | string; - getData_asU8(): Uint8Array; - getData_asB64(): string; - setData(value: Uint8Array | string): StreamingOpenRequest; - - - hasRecvAcknowledge(): boolean; - clearRecvAcknowledge(): void; - getRecvAcknowledge(): number; - setRecvAcknowledge(value: number): StreamingOpenRequest; - - - getContentCase(): StreamingOpenRequest.ContentCase; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): StreamingOpenRequest.AsObject; - static toObject(includeInstance: boolean, msg: StreamingOpenRequest): StreamingOpenRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: StreamingOpenRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): StreamingOpenRequest; - static deserializeBinaryFromReader(message: StreamingOpenRequest, reader: jspb.BinaryReader): StreamingOpenRequest; -} - -export namespace StreamingOpenRequest { - export type AsObject = { - config?: MonitorConfig.AsObject, - data: Uint8Array | string, - recvAcknowledge: number, - } - - export enum ContentCase { - CONTENT_NOT_SET = 0, - - CONFIG = 1, - - DATA = 2, - - RECV_ACKNOWLEDGE = 3, - - } - -} - -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; - - getRecvRateLimitBuffer(): number; - setRecvRateLimitBuffer(value: number): 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, - recvRateLimitBuffer: number, - } - - export enum TargetType { - TARGET_TYPE_SERIAL = 0, - TARGET_TYPE_NULL = 99, - } - -} - -export class StreamingOpenResponse extends jspb.Message { - getData(): Uint8Array | string; - getData_asU8(): Uint8Array; - getData_asB64(): string; - setData(value: Uint8Array | string): StreamingOpenResponse; - - getDropped(): number; - setDropped(value: number): StreamingOpenResponse; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): StreamingOpenResponse.AsObject; - static toObject(includeInstance: boolean, msg: StreamingOpenResponse): StreamingOpenResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: StreamingOpenResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): StreamingOpenResponse; - static deserializeBinaryFromReader(message: StreamingOpenResponse, reader: jspb.BinaryReader): StreamingOpenResponse; -} - -export namespace StreamingOpenResponse { - export type AsObject = { - data: Uint8Array | string, - dropped: number, - } -} diff --git a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/monitor/v1/monitor_pb.js b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/monitor/v1/monitor_pb.js deleted file mode 100644 index 4546fe982..000000000 --- a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/monitor/v1/monitor_pb.js +++ /dev/null @@ -1,819 +0,0 @@ -// source: cc/arduino/cli/monitor/v1/monitor.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @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! -/* eslint-disable */ -// @ts-nocheck - -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.v1.MonitorConfig', null, global); -goog.exportSymbol('proto.cc.arduino.cli.monitor.v1.MonitorConfig.TargetType', null, global); -goog.exportSymbol('proto.cc.arduino.cli.monitor.v1.StreamingOpenRequest', null, global); -goog.exportSymbol('proto.cc.arduino.cli.monitor.v1.StreamingOpenRequest.ContentCase', null, global); -goog.exportSymbol('proto.cc.arduino.cli.monitor.v1.StreamingOpenResponse', 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.v1.StreamingOpenRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.cc.arduino.cli.monitor.v1.StreamingOpenRequest.oneofGroups_); -}; -goog.inherits(proto.cc.arduino.cli.monitor.v1.StreamingOpenRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.cc.arduino.cli.monitor.v1.StreamingOpenRequest.displayName = 'proto.cc.arduino.cli.monitor.v1.StreamingOpenRequest'; -} -/** - * 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.v1.MonitorConfig = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.monitor.v1.MonitorConfig, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.cc.arduino.cli.monitor.v1.MonitorConfig.displayName = 'proto.cc.arduino.cli.monitor.v1.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.v1.StreamingOpenResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.monitor.v1.StreamingOpenResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.cc.arduino.cli.monitor.v1.StreamingOpenResponse.displayName = 'proto.cc.arduino.cli.monitor.v1.StreamingOpenResponse'; -} - -/** - * 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.v1.StreamingOpenRequest.oneofGroups_ = [[1,2,3]]; - -/** - * @enum {number} - */ -proto.cc.arduino.cli.monitor.v1.StreamingOpenRequest.ContentCase = { - CONTENT_NOT_SET: 0, - CONFIG: 1, - DATA: 2, - RECV_ACKNOWLEDGE: 3 -}; - -/** - * @return {proto.cc.arduino.cli.monitor.v1.StreamingOpenRequest.ContentCase} - */ -proto.cc.arduino.cli.monitor.v1.StreamingOpenRequest.prototype.getContentCase = function() { - return /** @type {proto.cc.arduino.cli.monitor.v1.StreamingOpenRequest.ContentCase} */(jspb.Message.computeOneofCase(this, proto.cc.arduino.cli.monitor.v1.StreamingOpenRequest.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.v1.StreamingOpenRequest.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.monitor.v1.StreamingOpenRequest.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.v1.StreamingOpenRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.monitor.v1.StreamingOpenRequest.toObject = function(includeInstance, msg) { - var f, obj = { - config: (f = msg.getConfig()) && proto.cc.arduino.cli.monitor.v1.MonitorConfig.toObject(includeInstance, f), - data: msg.getData_asB64(), - recvAcknowledge: jspb.Message.getFieldWithDefault(msg, 3, 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.monitor.v1.StreamingOpenRequest} - */ -proto.cc.arduino.cli.monitor.v1.StreamingOpenRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.monitor.v1.StreamingOpenRequest; - return proto.cc.arduino.cli.monitor.v1.StreamingOpenRequest.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.v1.StreamingOpenRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.monitor.v1.StreamingOpenRequest} - */ -proto.cc.arduino.cli.monitor.v1.StreamingOpenRequest.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.v1.MonitorConfig; - reader.readMessage(value,proto.cc.arduino.cli.monitor.v1.MonitorConfig.deserializeBinaryFromReader); - msg.setConfig(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setData(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt32()); - msg.setRecvAcknowledge(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.v1.StreamingOpenRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.monitor.v1.StreamingOpenRequest.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.v1.StreamingOpenRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.monitor.v1.StreamingOpenRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getConfig(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.cc.arduino.cli.monitor.v1.MonitorConfig.serializeBinaryToWriter - ); - } - f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 2)); - if (f != null) { - writer.writeBytes( - 2, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 3)); - if (f != null) { - writer.writeInt32( - 3, - f - ); - } -}; - - -/** - * optional MonitorConfig config = 1; - * @return {?proto.cc.arduino.cli.monitor.v1.MonitorConfig} - */ -proto.cc.arduino.cli.monitor.v1.StreamingOpenRequest.prototype.getConfig = function() { - return /** @type{?proto.cc.arduino.cli.monitor.v1.MonitorConfig} */ ( - jspb.Message.getWrapperField(this, proto.cc.arduino.cli.monitor.v1.MonitorConfig, 1)); -}; - - -/** - * @param {?proto.cc.arduino.cli.monitor.v1.MonitorConfig|undefined} value - * @return {!proto.cc.arduino.cli.monitor.v1.StreamingOpenRequest} returns this -*/ -proto.cc.arduino.cli.monitor.v1.StreamingOpenRequest.prototype.setConfig = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.cc.arduino.cli.monitor.v1.StreamingOpenRequest.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.cc.arduino.cli.monitor.v1.StreamingOpenRequest} returns this - */ -proto.cc.arduino.cli.monitor.v1.StreamingOpenRequest.prototype.clearConfig = function() { - return this.setConfig(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cc.arduino.cli.monitor.v1.StreamingOpenRequest.prototype.hasConfig = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bytes data = 2; - * @return {!(string|Uint8Array)} - */ -proto.cc.arduino.cli.monitor.v1.StreamingOpenRequest.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.v1.StreamingOpenRequest.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.v1.StreamingOpenRequest.prototype.getData_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getData())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.cc.arduino.cli.monitor.v1.StreamingOpenRequest} returns this - */ -proto.cc.arduino.cli.monitor.v1.StreamingOpenRequest.prototype.setData = function(value) { - return jspb.Message.setOneofField(this, 2, proto.cc.arduino.cli.monitor.v1.StreamingOpenRequest.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.cc.arduino.cli.monitor.v1.StreamingOpenRequest} returns this - */ -proto.cc.arduino.cli.monitor.v1.StreamingOpenRequest.prototype.clearData = function() { - return jspb.Message.setOneofField(this, 2, proto.cc.arduino.cli.monitor.v1.StreamingOpenRequest.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cc.arduino.cli.monitor.v1.StreamingOpenRequest.prototype.hasData = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional int32 recv_acknowledge = 3; - * @return {number} - */ -proto.cc.arduino.cli.monitor.v1.StreamingOpenRequest.prototype.getRecvAcknowledge = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.cc.arduino.cli.monitor.v1.StreamingOpenRequest} returns this - */ -proto.cc.arduino.cli.monitor.v1.StreamingOpenRequest.prototype.setRecvAcknowledge = function(value) { - return jspb.Message.setOneofField(this, 3, proto.cc.arduino.cli.monitor.v1.StreamingOpenRequest.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.cc.arduino.cli.monitor.v1.StreamingOpenRequest} returns this - */ -proto.cc.arduino.cli.monitor.v1.StreamingOpenRequest.prototype.clearRecvAcknowledge = function() { - return jspb.Message.setOneofField(this, 3, proto.cc.arduino.cli.monitor.v1.StreamingOpenRequest.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cc.arduino.cli.monitor.v1.StreamingOpenRequest.prototype.hasRecvAcknowledge = 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.v1.MonitorConfig.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.monitor.v1.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.v1.MonitorConfig} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.monitor.v1.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), - recvRateLimitBuffer: jspb.Message.getFieldWithDefault(msg, 4, 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.monitor.v1.MonitorConfig} - */ -proto.cc.arduino.cli.monitor.v1.MonitorConfig.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.monitor.v1.MonitorConfig; - return proto.cc.arduino.cli.monitor.v1.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.v1.MonitorConfig} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.monitor.v1.MonitorConfig} - */ -proto.cc.arduino.cli.monitor.v1.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.v1.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; - case 4: - var value = /** @type {number} */ (reader.readInt32()); - msg.setRecvRateLimitBuffer(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.v1.MonitorConfig.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.monitor.v1.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.v1.MonitorConfig} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.monitor.v1.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 - ); - } - f = message.getRecvRateLimitBuffer(); - if (f !== 0) { - writer.writeInt32( - 4, - f - ); - } -}; - - -/** - * @enum {number} - */ -proto.cc.arduino.cli.monitor.v1.MonitorConfig.TargetType = { - TARGET_TYPE_SERIAL: 0, - TARGET_TYPE_NULL: 99 -}; - -/** - * optional string target = 1; - * @return {string} - */ -proto.cc.arduino.cli.monitor.v1.MonitorConfig.prototype.getTarget = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.cc.arduino.cli.monitor.v1.MonitorConfig} returns this - */ -proto.cc.arduino.cli.monitor.v1.MonitorConfig.prototype.setTarget = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional TargetType type = 2; - * @return {!proto.cc.arduino.cli.monitor.v1.MonitorConfig.TargetType} - */ -proto.cc.arduino.cli.monitor.v1.MonitorConfig.prototype.getType = function() { - return /** @type {!proto.cc.arduino.cli.monitor.v1.MonitorConfig.TargetType} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {!proto.cc.arduino.cli.monitor.v1.MonitorConfig.TargetType} value - * @return {!proto.cc.arduino.cli.monitor.v1.MonitorConfig} returns this - */ -proto.cc.arduino.cli.monitor.v1.MonitorConfig.prototype.setType = function(value) { - return jspb.Message.setProto3EnumField(this, 2, value); -}; - - -/** - * optional google.protobuf.Struct additional_config = 3; - * @return {?proto.google.protobuf.Struct} - */ -proto.cc.arduino.cli.monitor.v1.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.v1.MonitorConfig} returns this -*/ -proto.cc.arduino.cli.monitor.v1.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.v1.MonitorConfig} returns this - */ -proto.cc.arduino.cli.monitor.v1.MonitorConfig.prototype.clearAdditionalConfig = function() { - return this.setAdditionalConfig(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cc.arduino.cli.monitor.v1.MonitorConfig.prototype.hasAdditionalConfig = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional int32 recv_rate_limit_buffer = 4; - * @return {number} - */ -proto.cc.arduino.cli.monitor.v1.MonitorConfig.prototype.getRecvRateLimitBuffer = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.cc.arduino.cli.monitor.v1.MonitorConfig} returns this - */ -proto.cc.arduino.cli.monitor.v1.MonitorConfig.prototype.setRecvRateLimitBuffer = function(value) { - return jspb.Message.setProto3IntField(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.monitor.v1.StreamingOpenResponse.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.monitor.v1.StreamingOpenResponse.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.v1.StreamingOpenResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.monitor.v1.StreamingOpenResponse.toObject = function(includeInstance, msg) { - var f, obj = { - data: msg.getData_asB64(), - dropped: 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.monitor.v1.StreamingOpenResponse} - */ -proto.cc.arduino.cli.monitor.v1.StreamingOpenResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.monitor.v1.StreamingOpenResponse; - return proto.cc.arduino.cli.monitor.v1.StreamingOpenResponse.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.v1.StreamingOpenResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.monitor.v1.StreamingOpenResponse} - */ -proto.cc.arduino.cli.monitor.v1.StreamingOpenResponse.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 {number} */ (reader.readInt32()); - msg.setDropped(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.v1.StreamingOpenResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.monitor.v1.StreamingOpenResponse.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.v1.StreamingOpenResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.monitor.v1.StreamingOpenResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getData_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getDropped(); - if (f !== 0) { - writer.writeInt32( - 2, - f - ); - } -}; - - -/** - * optional bytes data = 1; - * @return {!(string|Uint8Array)} - */ -proto.cc.arduino.cli.monitor.v1.StreamingOpenResponse.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.v1.StreamingOpenResponse.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.v1.StreamingOpenResponse.prototype.getData_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getData())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.cc.arduino.cli.monitor.v1.StreamingOpenResponse} returns this - */ -proto.cc.arduino.cli.monitor.v1.StreamingOpenResponse.prototype.setData = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional int32 dropped = 2; - * @return {number} - */ -proto.cc.arduino.cli.monitor.v1.StreamingOpenResponse.prototype.getDropped = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.cc.arduino.cli.monitor.v1.StreamingOpenResponse} returns this - */ -proto.cc.arduino.cli.monitor.v1.StreamingOpenResponse.prototype.setDropped = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -goog.object.extend(exports, proto.cc.arduino.cli.monitor.v1);