#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Instance {
#[prost(int32, tag = "1")]
pub id: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DownloadProgress {
#[prost(string, tag = "1")]
pub url: std::string::String,
#[prost(string, tag = "2")]
pub file: std::string::String,
#[prost(int64, tag = "3")]
pub total_size: i64,
#[prost(int64, tag = "4")]
pub downloaded: i64,
#[prost(bool, tag = "5")]
pub completed: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TaskProgress {
#[prost(string, tag = "1")]
pub name: std::string::String,
#[prost(string, tag = "2")]
pub message: std::string::String,
#[prost(bool, tag = "3")]
pub completed: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Programmer {
#[prost(string, tag = "1")]
pub platform: std::string::String,
#[prost(string, tag = "2")]
pub id: std::string::String,
#[prost(string, tag = "3")]
pub name: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BoardDetailsReq {
#[prost(message, optional, tag = "1")]
pub instance: ::std::option::Option<Instance>,
#[prost(string, tag = "2")]
pub fqbn: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BoardDetailsResp {
#[prost(string, tag = "1")]
pub fqbn: std::string::String,
#[prost(string, tag = "2")]
pub name: std::string::String,
#[prost(string, tag = "3")]
pub version: std::string::String,
#[prost(string, tag = "4")]
pub properties_id: std::string::String,
#[prost(string, tag = "5")]
pub alias: std::string::String,
#[prost(bool, tag = "6")]
pub official: bool,
#[prost(string, tag = "7")]
pub pinout: std::string::String,
#[prost(message, optional, tag = "8")]
pub package: ::std::option::Option<Package>,
#[prost(message, optional, tag = "9")]
pub platform: ::std::option::Option<BoardPlatform>,
#[prost(message, repeated, tag = "10")]
pub tools_dependencies: ::std::vec::Vec<ToolsDependencies>,
#[prost(message, repeated, tag = "11")]
pub config_options: ::std::vec::Vec<ConfigOption>,
#[prost(message, repeated, tag = "12")]
pub identification_pref: ::std::vec::Vec<IdentificationPref>,
#[prost(message, repeated, tag = "13")]
pub programmers: ::std::vec::Vec<Programmer>,
#[prost(bool, tag = "14")]
pub debugging_supported: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IdentificationPref {
#[prost(message, optional, tag = "1")]
pub usb_id: ::std::option::Option<Usbid>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Usbid {
#[prost(string, tag = "1")]
pub vid: std::string::String,
#[prost(string, tag = "2")]
pub pid: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Package {
#[prost(string, tag = "1")]
pub maintainer: std::string::String,
#[prost(string, tag = "2")]
pub url: std::string::String,
#[prost(string, tag = "3")]
pub website_url: std::string::String,
#[prost(string, tag = "4")]
pub email: std::string::String,
#[prost(string, tag = "5")]
pub name: std::string::String,
#[prost(message, optional, tag = "6")]
pub help: ::std::option::Option<Help>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Help {
#[prost(string, tag = "1")]
pub online: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BoardPlatform {
#[prost(string, tag = "1")]
pub architecture: std::string::String,
#[prost(string, tag = "2")]
pub category: std::string::String,
#[prost(string, tag = "3")]
pub url: std::string::String,
#[prost(string, tag = "4")]
pub archive_file_name: std::string::String,
#[prost(string, tag = "5")]
pub checksum: std::string::String,
#[prost(int64, tag = "6")]
pub size: i64,
#[prost(string, tag = "7")]
pub name: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ToolsDependencies {
#[prost(string, tag = "1")]
pub packager: std::string::String,
#[prost(string, tag = "2")]
pub name: std::string::String,
#[prost(string, tag = "3")]
pub version: std::string::String,
#[prost(message, repeated, tag = "4")]
pub systems: ::std::vec::Vec<Systems>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Systems {
#[prost(string, tag = "1")]
pub checksum: std::string::String,
#[prost(string, tag = "2")]
pub host: std::string::String,
#[prost(string, tag = "3")]
pub archive_file_name: std::string::String,
#[prost(string, tag = "4")]
pub url: std::string::String,
#[prost(int64, tag = "5")]
pub size: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConfigOption {
#[prost(string, tag = "1")]
pub option: std::string::String,
#[prost(string, tag = "2")]
pub option_label: std::string::String,
#[prost(message, repeated, tag = "3")]
pub values: ::std::vec::Vec<ConfigValue>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConfigValue {
#[prost(string, tag = "1")]
pub value: std::string::String,
#[prost(string, tag = "2")]
pub value_label: std::string::String,
#[prost(bool, tag = "3")]
pub selected: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BoardAttachReq {
#[prost(message, optional, tag = "1")]
pub instance: ::std::option::Option<Instance>,
#[prost(string, tag = "2")]
pub board_uri: std::string::String,
#[prost(string, tag = "3")]
pub sketch_path: std::string::String,
#[prost(string, tag = "4")]
pub search_timeout: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BoardAttachResp {
#[prost(message, optional, tag = "1")]
pub task_progress: ::std::option::Option<TaskProgress>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BoardListReq {
#[prost(message, optional, tag = "1")]
pub instance: ::std::option::Option<Instance>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BoardListResp {
#[prost(message, repeated, tag = "1")]
pub ports: ::std::vec::Vec<DetectedPort>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DetectedPort {
#[prost(string, tag = "1")]
pub address: std::string::String,
#[prost(string, tag = "2")]
pub protocol: std::string::String,
#[prost(string, tag = "3")]
pub protocol_label: std::string::String,
#[prost(message, repeated, tag = "4")]
pub boards: ::std::vec::Vec<BoardListItem>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BoardListAllReq {
#[prost(message, optional, tag = "1")]
pub instance: ::std::option::Option<Instance>,
#[prost(string, repeated, tag = "2")]
pub search_args: ::std::vec::Vec<std::string::String>,
#[prost(bool, tag = "3")]
pub include_hidden_boards: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BoardListAllResp {
#[prost(message, repeated, tag = "1")]
pub boards: ::std::vec::Vec<BoardListItem>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BoardListWatchReq {
#[prost(message, optional, tag = "1")]
pub instance: ::std::option::Option<Instance>,
#[prost(bool, tag = "2")]
pub interrupt: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BoardListWatchResp {
#[prost(string, tag = "1")]
pub event_type: std::string::String,
#[prost(message, optional, tag = "2")]
pub port: ::std::option::Option<DetectedPort>,
#[prost(string, tag = "3")]
pub error: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BoardListItem {
#[prost(string, tag = "1")]
pub name: std::string::String,
#[prost(string, tag = "2")]
pub fqbn: std::string::String,
#[prost(bool, tag = "3")]
pub is_hidden: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CompileReq {
#[prost(message, optional, tag = "1")]
pub instance: ::std::option::Option<Instance>,
#[prost(string, tag = "2")]
pub fqbn: std::string::String,
#[prost(string, tag = "3")]
pub sketch_path: std::string::String,
#[prost(bool, tag = "4")]
pub show_properties: bool,
#[prost(bool, tag = "5")]
pub preprocess: bool,
#[prost(string, tag = "6")]
pub build_cache_path: std::string::String,
#[prost(string, tag = "7")]
pub build_path: std::string::String,
#[prost(string, repeated, tag = "8")]
pub build_properties: ::std::vec::Vec<std::string::String>,
#[prost(string, tag = "9")]
pub warnings: std::string::String,
#[prost(bool, tag = "10")]
pub verbose: bool,
#[prost(bool, tag = "11")]
pub quiet: bool,
#[prost(string, tag = "12")]
pub vid_pid: std::string::String,
#[prost(int32, tag = "14")]
pub jobs: i32,
#[prost(string, repeated, tag = "15")]
pub libraries: ::std::vec::Vec<std::string::String>,
#[prost(bool, tag = "16")]
pub optimize_for_debug: bool,
#[prost(string, tag = "18")]
pub export_dir: std::string::String,
#[prost(bool, tag = "19")]
pub clean: bool,
#[prost(bool, tag = "20")]
pub export_binaries: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CompileResp {
#[prost(bytes, tag = "1")]
pub out_stream: std::vec::Vec<u8>,
#[prost(bytes, tag = "2")]
pub err_stream: std::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PlatformInstallReq {
#[prost(message, optional, tag = "1")]
pub instance: ::std::option::Option<Instance>,
#[prost(string, tag = "2")]
pub platform_package: std::string::String,
#[prost(string, tag = "3")]
pub architecture: std::string::String,
#[prost(string, tag = "4")]
pub version: std::string::String,
#[prost(bool, tag = "5")]
pub skip_post_install: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PlatformInstallResp {
#[prost(message, optional, tag = "1")]
pub progress: ::std::option::Option<DownloadProgress>,
#[prost(message, optional, tag = "2")]
pub task_progress: ::std::option::Option<TaskProgress>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PlatformDownloadReq {
#[prost(message, optional, tag = "1")]
pub instance: ::std::option::Option<Instance>,
#[prost(string, tag = "2")]
pub platform_package: std::string::String,
#[prost(string, tag = "3")]
pub architecture: std::string::String,
#[prost(string, tag = "4")]
pub version: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PlatformDownloadResp {
#[prost(message, optional, tag = "1")]
pub progress: ::std::option::Option<DownloadProgress>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PlatformUninstallReq {
#[prost(message, optional, tag = "1")]
pub instance: ::std::option::Option<Instance>,
#[prost(string, tag = "2")]
pub platform_package: std::string::String,
#[prost(string, tag = "3")]
pub architecture: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PlatformUninstallResp {
#[prost(message, optional, tag = "1")]
pub task_progress: ::std::option::Option<TaskProgress>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PlatformUpgradeReq {
#[prost(message, optional, tag = "1")]
pub instance: ::std::option::Option<Instance>,
#[prost(string, tag = "2")]
pub platform_package: std::string::String,
#[prost(string, tag = "3")]
pub architecture: std::string::String,
#[prost(bool, tag = "4")]
pub skip_post_install: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PlatformUpgradeResp {
#[prost(message, optional, tag = "1")]
pub progress: ::std::option::Option<DownloadProgress>,
#[prost(message, optional, tag = "2")]
pub task_progress: ::std::option::Option<TaskProgress>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PlatformSearchReq {
#[prost(message, optional, tag = "1")]
pub instance: ::std::option::Option<Instance>,
#[prost(string, tag = "2")]
pub search_args: std::string::String,
#[prost(bool, tag = "3")]
pub all_versions: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PlatformSearchResp {
#[prost(message, repeated, tag = "1")]
pub search_output: ::std::vec::Vec<Platform>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PlatformListReq {
#[prost(message, optional, tag = "1")]
pub instance: ::std::option::Option<Instance>,
#[prost(bool, tag = "2")]
pub updatable_only: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PlatformListResp {
#[prost(message, repeated, tag = "1")]
pub installed_platform: ::std::vec::Vec<Platform>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Platform {
#[prost(string, tag = "1")]
pub id: std::string::String,
#[prost(string, tag = "2")]
pub installed: std::string::String,
#[prost(string, tag = "3")]
pub latest: std::string::String,
#[prost(string, tag = "4")]
pub name: std::string::String,
#[prost(string, tag = "5")]
pub maintainer: std::string::String,
#[prost(string, tag = "6")]
pub website: std::string::String,
#[prost(string, tag = "7")]
pub email: std::string::String,
#[prost(message, repeated, tag = "8")]
pub boards: ::std::vec::Vec<Board>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Board {
#[prost(string, tag = "1")]
pub name: std::string::String,
#[prost(string, tag = "2")]
pub fqbn: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UploadReq {
#[prost(message, optional, tag = "1")]
pub instance: ::std::option::Option<Instance>,
#[prost(string, tag = "2")]
pub fqbn: std::string::String,
#[prost(string, tag = "3")]
pub sketch_path: std::string::String,
#[prost(string, tag = "4")]
pub port: std::string::String,
#[prost(bool, tag = "5")]
pub verbose: bool,
#[prost(bool, tag = "6")]
pub verify: bool,
#[prost(string, tag = "7")]
pub import_file: std::string::String,
#[prost(string, tag = "8")]
pub import_dir: std::string::String,
#[prost(string, tag = "9")]
pub programmer: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UploadResp {
#[prost(bytes, tag = "1")]
pub out_stream: std::vec::Vec<u8>,
#[prost(bytes, tag = "2")]
pub err_stream: std::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UploadUsingProgrammerReq {
#[prost(message, optional, tag = "1")]
pub instance: ::std::option::Option<Instance>,
#[prost(string, tag = "2")]
pub fqbn: std::string::String,
#[prost(string, tag = "3")]
pub sketch_path: std::string::String,
#[prost(string, tag = "4")]
pub port: std::string::String,
#[prost(bool, tag = "5")]
pub verbose: bool,
#[prost(bool, tag = "6")]
pub verify: bool,
#[prost(string, tag = "7")]
pub import_file: std::string::String,
#[prost(string, tag = "8")]
pub import_dir: std::string::String,
#[prost(string, tag = "9")]
pub programmer: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UploadUsingProgrammerResp {
#[prost(bytes, tag = "1")]
pub out_stream: std::vec::Vec<u8>,
#[prost(bytes, tag = "2")]
pub err_stream: std::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BurnBootloaderReq {
#[prost(message, optional, tag = "1")]
pub instance: ::std::option::Option<Instance>,
#[prost(string, tag = "2")]
pub fqbn: std::string::String,
#[prost(string, tag = "3")]
pub port: std::string::String,
#[prost(bool, tag = "4")]
pub verbose: bool,
#[prost(bool, tag = "5")]
pub verify: bool,
#[prost(string, tag = "6")]
pub programmer: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BurnBootloaderResp {
#[prost(bytes, tag = "1")]
pub out_stream: std::vec::Vec<u8>,
#[prost(bytes, tag = "2")]
pub err_stream: std::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListProgrammersAvailableForUploadReq {
#[prost(message, optional, tag = "1")]
pub instance: ::std::option::Option<Instance>,
#[prost(string, tag = "2")]
pub fqbn: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListProgrammersAvailableForUploadResp {
#[prost(message, repeated, tag = "1")]
pub programmers: ::std::vec::Vec<Programmer>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LibraryDownloadReq {
#[prost(message, optional, tag = "1")]
pub instance: ::std::option::Option<Instance>,
#[prost(string, tag = "2")]
pub name: std::string::String,
#[prost(string, tag = "3")]
pub version: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LibraryDownloadResp {
#[prost(message, optional, tag = "1")]
pub progress: ::std::option::Option<DownloadProgress>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LibraryInstallReq {
#[prost(message, optional, tag = "1")]
pub instance: ::std::option::Option<Instance>,
#[prost(string, tag = "2")]
pub name: std::string::String,
#[prost(string, tag = "3")]
pub version: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LibraryInstallResp {
#[prost(message, optional, tag = "1")]
pub progress: ::std::option::Option<DownloadProgress>,
#[prost(message, optional, tag = "2")]
pub task_progress: ::std::option::Option<TaskProgress>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LibraryUninstallReq {
#[prost(message, optional, tag = "1")]
pub instance: ::std::option::Option<Instance>,
#[prost(string, tag = "2")]
pub name: std::string::String,
#[prost(string, tag = "3")]
pub version: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LibraryUninstallResp {
#[prost(message, optional, tag = "1")]
pub task_progress: ::std::option::Option<TaskProgress>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LibraryUpgradeAllReq {
#[prost(message, optional, tag = "1")]
pub instance: ::std::option::Option<Instance>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LibraryUpgradeAllResp {
#[prost(message, optional, tag = "1")]
pub progress: ::std::option::Option<DownloadProgress>,
#[prost(message, optional, tag = "2")]
pub task_progress: ::std::option::Option<TaskProgress>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LibraryResolveDependenciesReq {
#[prost(message, optional, tag = "1")]
pub instance: ::std::option::Option<Instance>,
#[prost(string, tag = "2")]
pub name: std::string::String,
#[prost(string, tag = "3")]
pub version: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LibraryResolveDependenciesResp {
#[prost(message, repeated, tag = "1")]
pub dependencies: ::std::vec::Vec<LibraryDependencyStatus>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LibraryDependencyStatus {
#[prost(string, tag = "1")]
pub name: std::string::String,
#[prost(string, tag = "2")]
pub version_required: std::string::String,
#[prost(string, tag = "3")]
pub version_installed: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LibrarySearchReq {
#[prost(message, optional, tag = "1")]
pub instance: ::std::option::Option<Instance>,
#[prost(string, tag = "2")]
pub query: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LibrarySearchResp {
#[prost(message, repeated, tag = "1")]
pub libraries: ::std::vec::Vec<SearchedLibrary>,
#[prost(enumeration = "LibrarySearchStatus", tag = "2")]
pub status: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchedLibrary {
#[prost(string, tag = "1")]
pub name: std::string::String,
#[prost(map = "string, message", tag = "2")]
pub releases: ::std::collections::HashMap<std::string::String, LibraryRelease>,
#[prost(message, optional, tag = "3")]
pub latest: ::std::option::Option<LibraryRelease>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LibraryRelease {
#[prost(string, tag = "1")]
pub author: std::string::String,
#[prost(string, tag = "2")]
pub version: std::string::String,
#[prost(string, tag = "3")]
pub maintainer: std::string::String,
#[prost(string, tag = "4")]
pub sentence: std::string::String,
#[prost(string, tag = "5")]
pub paragraph: std::string::String,
#[prost(string, tag = "6")]
pub website: std::string::String,
#[prost(string, tag = "7")]
pub category: std::string::String,
#[prost(string, repeated, tag = "8")]
pub architectures: ::std::vec::Vec<std::string::String>,
#[prost(string, repeated, tag = "9")]
pub types: ::std::vec::Vec<std::string::String>,
#[prost(message, optional, tag = "10")]
pub resources: ::std::option::Option<DownloadResource>,
#[prost(string, tag = "11")]
pub license: std::string::String,
#[prost(string, repeated, tag = "12")]
pub provides_includes: ::std::vec::Vec<std::string::String>,
#[prost(message, repeated, tag = "13")]
pub dependencies: ::std::vec::Vec<LibraryDependency>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LibraryDependency {
#[prost(string, tag = "1")]
pub name: std::string::String,
#[prost(string, tag = "2")]
pub version_constraint: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DownloadResource {
#[prost(string, tag = "1")]
pub url: std::string::String,
#[prost(string, tag = "2")]
pub archivefilename: std::string::String,
#[prost(string, tag = "3")]
pub checksum: std::string::String,
#[prost(int64, tag = "4")]
pub size: i64,
#[prost(string, tag = "5")]
pub cachepath: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LibraryListReq {
#[prost(message, optional, tag = "1")]
pub instance: ::std::option::Option<Instance>,
#[prost(bool, tag = "2")]
pub all: bool,
#[prost(bool, tag = "3")]
pub updatable: bool,
#[prost(string, tag = "4")]
pub name: std::string::String,
#[prost(string, tag = "5")]
pub fqbn: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LibraryListResp {
#[prost(message, repeated, tag = "1")]
pub installed_library: ::std::vec::Vec<InstalledLibrary>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InstalledLibrary {
#[prost(message, optional, tag = "1")]
pub library: ::std::option::Option<Library>,
#[prost(message, optional, tag = "2")]
pub release: ::std::option::Option<LibraryRelease>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Library {
#[prost(string, tag = "1")]
pub name: std::string::String,
#[prost(string, tag = "2")]
pub author: std::string::String,
#[prost(string, tag = "3")]
pub maintainer: std::string::String,
#[prost(string, tag = "4")]
pub sentence: std::string::String,
#[prost(string, tag = "5")]
pub paragraph: std::string::String,
#[prost(string, tag = "6")]
pub website: std::string::String,
#[prost(string, tag = "7")]
pub category: std::string::String,
#[prost(string, repeated, tag = "8")]
pub architectures: ::std::vec::Vec<std::string::String>,
#[prost(string, repeated, tag = "9")]
pub types: ::std::vec::Vec<std::string::String>,
#[prost(string, tag = "10")]
pub install_dir: std::string::String,
#[prost(string, tag = "11")]
pub source_dir: std::string::String,
#[prost(string, tag = "12")]
pub utility_dir: std::string::String,
#[prost(string, tag = "14")]
pub container_platform: std::string::String,
#[prost(string, tag = "16")]
pub real_name: std::string::String,
#[prost(bool, tag = "17")]
pub dot_a_linkage: bool,
#[prost(bool, tag = "18")]
pub precompiled: bool,
#[prost(string, tag = "19")]
pub ld_flags: std::string::String,
#[prost(bool, tag = "20")]
pub is_legacy: bool,
#[prost(string, tag = "21")]
pub version: std::string::String,
#[prost(string, tag = "22")]
pub license: std::string::String,
#[prost(map = "string, string", tag = "23")]
pub properties: ::std::collections::HashMap<std::string::String, std::string::String>,
#[prost(enumeration = "LibraryLocation", tag = "24")]
pub location: i32,
#[prost(enumeration = "LibraryLayout", tag = "25")]
pub layout: i32,
#[prost(string, repeated, tag = "26")]
pub examples: ::std::vec::Vec<std::string::String>,
#[prost(string, repeated, tag = "27")]
pub provides_includes: ::std::vec::Vec<std::string::String>,
#[prost(map = "string, bool", tag = "28")]
pub compatible_with: ::std::collections::HashMap<std::string::String, bool>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ZipLibraryInstallReq {
#[prost(message, optional, tag = "1")]
pub instance: ::std::option::Option<Instance>,
#[prost(string, tag = "2")]
pub path: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ZipLibraryInstallResp {
#[prost(message, optional, tag = "1")]
pub task_progress: ::std::option::Option<TaskProgress>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GitLibraryInstallReq {
#[prost(message, optional, tag = "1")]
pub instance: ::std::option::Option<Instance>,
#[prost(string, tag = "2")]
pub url: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GitLibraryInstallResp {
#[prost(message, optional, tag = "1")]
pub task_progress: ::std::option::Option<TaskProgress>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum LibrarySearchStatus {
Failed = 0,
Success = 1,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum LibraryLayout {
FlatLayout = 0,
RecursiveLayout = 1,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum LibraryLocation {
IdeBuiltin = 0,
User = 1,
PlatformBuiltin = 2,
ReferencedPlatformBuiltin = 3,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InitReq {
#[prost(bool, tag = "2")]
pub library_manager_only: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InitResp {
#[prost(message, optional, tag = "1")]
pub instance: ::std::option::Option<Instance>,
#[prost(string, repeated, tag = "2")]
pub platforms_index_errors: ::std::vec::Vec<std::string::String>,
#[prost(string, tag = "3")]
pub libraries_index_error: std::string::String,
#[prost(message, optional, tag = "4")]
pub download_progress: ::std::option::Option<DownloadProgress>,
#[prost(message, optional, tag = "5")]
pub task_progress: ::std::option::Option<TaskProgress>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DestroyReq {
#[prost(message, optional, tag = "1")]
pub instance: ::std::option::Option<Instance>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DestroyResp {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RescanReq {
#[prost(message, optional, tag = "1")]
pub instance: ::std::option::Option<Instance>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RescanResp {
#[prost(string, repeated, tag = "1")]
pub platforms_index_errors: ::std::vec::Vec<std::string::String>,
#[prost(string, tag = "2")]
pub libraries_index_error: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateIndexReq {
#[prost(message, optional, tag = "1")]
pub instance: ::std::option::Option<Instance>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateIndexResp {
#[prost(message, optional, tag = "1")]
pub download_progress: ::std::option::Option<DownloadProgress>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateLibrariesIndexReq {
#[prost(message, optional, tag = "1")]
pub instance: ::std::option::Option<Instance>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateLibrariesIndexResp {
#[prost(message, optional, tag = "1")]
pub download_progress: ::std::option::Option<DownloadProgress>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateCoreLibrariesIndexReq {
#[prost(message, optional, tag = "1")]
pub instance: ::std::option::Option<Instance>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateCoreLibrariesIndexResp {
#[prost(message, optional, tag = "1")]
pub download_progress: ::std::option::Option<DownloadProgress>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OutdatedReq {
#[prost(message, optional, tag = "1")]
pub instance: ::std::option::Option<Instance>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OutdatedResp {
#[prost(message, repeated, tag = "1")]
pub outdated_library: ::std::vec::Vec<InstalledLibrary>,
#[prost(message, repeated, tag = "2")]
pub outdated_platform: ::std::vec::Vec<Platform>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpgradeReq {
#[prost(message, optional, tag = "1")]
pub instance: ::std::option::Option<Instance>,
#[prost(bool, tag = "2")]
pub skip_post_install: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpgradeResp {
#[prost(message, optional, tag = "1")]
pub progress: ::std::option::Option<DownloadProgress>,
#[prost(message, optional, tag = "2")]
pub task_progress: ::std::option::Option<TaskProgress>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VersionReq {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VersionResp {
#[prost(string, tag = "1")]
pub version: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LoadSketchReq {
#[prost(message, optional, tag = "1")]
pub instance: ::std::option::Option<Instance>,
#[prost(string, tag = "2")]
pub sketch_path: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LoadSketchResp {
#[prost(string, tag = "1")]
pub main_file: std::string::String,
#[prost(string, tag = "2")]
pub location_path: std::string::String,
#[prost(string, repeated, tag = "3")]
pub other_sketch_files: ::std::vec::Vec<std::string::String>,
#[prost(string, repeated, tag = "4")]
pub additional_files: ::std::vec::Vec<std::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ArchiveSketchReq {
#[prost(string, tag = "1")]
pub sketch_path: std::string::String,
#[prost(string, tag = "2")]
pub archive_path: std::string::String,
#[prost(bool, tag = "3")]
pub include_build_dir: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ArchiveSketchResp {}
#[doc = r" Generated client implementations."]
pub mod arduino_core_client {
#![allow(unused_variables, dead_code, missing_docs)]
use tonic::codegen::*;
#[doc = " The main Arduino Platform Service"]
pub struct ArduinoCoreClient<T> {
inner: tonic::client::Grpc<T>,
}
impl ArduinoCoreClient<tonic::transport::Channel> {
#[doc = r" Attempt to create a new client by connecting to a given endpoint."]
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: std::convert::TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> ArduinoCoreClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + HttpBody + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as HttpBody>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor(inner: T, interceptor: impl Into<tonic::Interceptor>) -> Self {
let inner = tonic::client::Grpc::with_interceptor(inner, interceptor);
Self { inner }
}
#[doc = " Start a new instance of the Arduino Core Service"]
pub async fn init(
&mut self,
request: impl tonic::IntoRequest<super::InitReq>,
) -> Result<tonic::Response<tonic::codec::Streaming<super::InitResp>>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path =
http::uri::PathAndQuery::from_static("/cc.arduino.cli.commands.ArduinoCore/Init");
self.inner
.server_streaming(request.into_request(), path, codec)
.await
}
#[doc = " Destroy an instance of the Arduino Core Service"]
pub async fn destroy(
&mut self,
request: impl tonic::IntoRequest<super::DestroyReq>,
) -> Result<tonic::Response<super::DestroyResp>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/cc.arduino.cli.commands.ArduinoCore/Destroy",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Rescan instance of the Arduino Core Service"]
pub async fn rescan(
&mut self,
request: impl tonic::IntoRequest<super::RescanReq>,
) -> Result<tonic::Response<super::RescanResp>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path =
http::uri::PathAndQuery::from_static("/cc.arduino.cli.commands.ArduinoCore/Rescan");
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Update package index of the Arduino Core Service"]
pub async fn update_index(
&mut self,
request: impl tonic::IntoRequest<super::UpdateIndexReq>,
) -> Result<tonic::Response<tonic::codec::Streaming<super::UpdateIndexResp>>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/cc.arduino.cli.commands.ArduinoCore/UpdateIndex",
);
self.inner
.server_streaming(request.into_request(), path, codec)
.await
}
#[doc = " Update libraries index"]
pub async fn update_libraries_index(
&mut self,
request: impl tonic::IntoRequest<super::UpdateLibrariesIndexReq>,
) -> Result<
tonic::Response<tonic::codec::Streaming<super::UpdateLibrariesIndexResp>>,
tonic::Status,
> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/cc.arduino.cli.commands.ArduinoCore/UpdateLibrariesIndex",
);
self.inner
.server_streaming(request.into_request(), path, codec)
.await
}
#[doc = " Update packages indexes for both Cores and Libraries"]
pub async fn update_core_libraries_index(
&mut self,
request: impl tonic::IntoRequest<super::UpdateCoreLibrariesIndexReq>,
) -> Result<
tonic::Response<tonic::codec::Streaming<super::UpdateCoreLibrariesIndexResp>>,
tonic::Status,
> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/cc.arduino.cli.commands.ArduinoCore/UpdateCoreLibrariesIndex",
);
self.inner
.server_streaming(request.into_request(), path, codec)
.await
}
#[doc = " Outdated returns a message with a list of outdated Cores and Libraries"]
pub async fn outdated(
&mut self,
request: impl tonic::IntoRequest<super::OutdatedReq>,
) -> Result<tonic::Response<super::OutdatedResp>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/cc.arduino.cli.commands.ArduinoCore/Outdated",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Upgrade both Cores and Libraries"]
pub async fn upgrade(
&mut self,
request: impl tonic::IntoRequest<super::UpgradeReq>,
) -> Result<tonic::Response<tonic::codec::Streaming<super::UpgradeResp>>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/cc.arduino.cli.commands.ArduinoCore/Upgrade",
);
self.inner
.server_streaming(request.into_request(), path, codec)
.await
}
#[doc = " Get the version of Arduino CLI in use."]
pub async fn version(
&mut self,
request: impl tonic::IntoRequest<super::VersionReq>,
) -> Result<tonic::Response<super::VersionResp>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/cc.arduino.cli.commands.ArduinoCore/Version",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Returns all files composing a Sketch"]
pub async fn load_sketch(
&mut self,
request: impl tonic::IntoRequest<super::LoadSketchReq>,
) -> Result<tonic::Response<super::LoadSketchResp>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/cc.arduino.cli.commands.ArduinoCore/LoadSketch",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates a zip file containing all files of specified Sketch"]
pub async fn archive_sketch(
&mut self,
request: impl tonic::IntoRequest<super::ArchiveSketchReq>,
) -> Result<tonic::Response<super::ArchiveSketchResp>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/cc.arduino.cli.commands.ArduinoCore/ArchiveSketch",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Requests details about a board"]
pub async fn board_details(
&mut self,
request: impl tonic::IntoRequest<super::BoardDetailsReq>,
) -> Result<tonic::Response<super::BoardDetailsResp>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/cc.arduino.cli.commands.ArduinoCore/BoardDetails",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Attach a board to a sketch. When the `fqbn` field of a request is not"]
#[doc = " provided, the FQBN of the attached board will be used."]
pub async fn board_attach(
&mut self,
request: impl tonic::IntoRequest<super::BoardAttachReq>,
) -> Result<tonic::Response<tonic::codec::Streaming<super::BoardAttachResp>>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/cc.arduino.cli.commands.ArduinoCore/BoardAttach",
);
self.inner
.server_streaming(request.into_request(), path, codec)
.await
}
#[doc = " List the boards currently connected to the computer."]
pub async fn board_list(
&mut self,
request: impl tonic::IntoRequest<super::BoardListReq>,
) -> Result<tonic::Response<super::BoardListResp>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/cc.arduino.cli.commands.ArduinoCore/BoardList",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " List all the boards provided by installed platforms."]
pub async fn board_list_all(
&mut self,
request: impl tonic::IntoRequest<super::BoardListAllReq>,
) -> Result<tonic::Response<super::BoardListAllResp>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/cc.arduino.cli.commands.ArduinoCore/BoardListAll",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " List boards connection and disconnected events."]
pub async fn board_list_watch(
&mut self,
request: impl tonic::IntoStreamingRequest<Message = super::BoardListWatchReq>,
) -> Result<
tonic::Response<tonic::codec::Streaming<super::BoardListWatchResp>>,
tonic::Status,
> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/cc.arduino.cli.commands.ArduinoCore/BoardListWatch",
);
self.inner
.streaming(request.into_streaming_request(), path, codec)
.await
}
#[doc = " Compile an Arduino sketch."]
pub async fn compile(
&mut self,
request: impl tonic::IntoRequest<super::CompileReq>,
) -> Result<tonic::Response<tonic::codec::Streaming<super::CompileResp>>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/cc.arduino.cli.commands.ArduinoCore/Compile",
);
self.inner
.server_streaming(request.into_request(), path, codec)
.await
}
#[doc = " Download and install a platform and its tool dependencies."]
pub async fn platform_install(
&mut self,
request: impl tonic::IntoRequest<super::PlatformInstallReq>,
) -> Result<
tonic::Response<tonic::codec::Streaming<super::PlatformInstallResp>>,
tonic::Status,
> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/cc.arduino.cli.commands.ArduinoCore/PlatformInstall",
);
self.inner
.server_streaming(request.into_request(), path, codec)
.await
}
#[doc = " Download a platform and its tool dependencies to the `staging/packages`"]
#[doc = " subdirectory of the data directory."]
pub async fn platform_download(
&mut self,
request: impl tonic::IntoRequest<super::PlatformDownloadReq>,
) -> Result<
tonic::Response<tonic::codec::Streaming<super::PlatformDownloadResp>>,
tonic::Status,
> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/cc.arduino.cli.commands.ArduinoCore/PlatformDownload",
);
self.inner
.server_streaming(request.into_request(), path, codec)
.await
}
#[doc = " Uninstall a platform as well as its tool dependencies that are not used by"]
#[doc = " other installed platforms."]
pub async fn platform_uninstall(
&mut self,
request: impl tonic::IntoRequest<super::PlatformUninstallReq>,
) -> Result<
tonic::Response<tonic::codec::Streaming<super::PlatformUninstallResp>>,
tonic::Status,
> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/cc.arduino.cli.commands.ArduinoCore/PlatformUninstall",
);
self.inner
.server_streaming(request.into_request(), path, codec)
.await
}
#[doc = " Upgrade an installed platform to the latest version."]
pub async fn platform_upgrade(
&mut self,
request: impl tonic::IntoRequest<super::PlatformUpgradeReq>,
) -> Result<
tonic::Response<tonic::codec::Streaming<super::PlatformUpgradeResp>>,
tonic::Status,
> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/cc.arduino.cli.commands.ArduinoCore/PlatformUpgrade",
);
self.inner
.server_streaming(request.into_request(), path, codec)
.await
}
#[doc = " Upload a compiled sketch to a board."]
pub async fn upload(
&mut self,
request: impl tonic::IntoRequest<super::UploadReq>,
) -> Result<tonic::Response<tonic::codec::Streaming<super::UploadResp>>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path =
http::uri::PathAndQuery::from_static("/cc.arduino.cli.commands.ArduinoCore/Upload");
self.inner
.server_streaming(request.into_request(), path, codec)
.await
}
#[doc = " Upload a compiled sketch to a board using a programmer."]
pub async fn upload_using_programmer(
&mut self,
request: impl tonic::IntoRequest<super::UploadUsingProgrammerReq>,
) -> Result<
tonic::Response<tonic::codec::Streaming<super::UploadUsingProgrammerResp>>,
tonic::Status,
> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/cc.arduino.cli.commands.ArduinoCore/UploadUsingProgrammer",
);
self.inner
.server_streaming(request.into_request(), path, codec)
.await
}
#[doc = " List programmers available for a board."]
pub async fn list_programmers_available_for_upload(
&mut self,
request: impl tonic::IntoRequest<super::ListProgrammersAvailableForUploadReq>,
) -> Result<tonic::Response<super::ListProgrammersAvailableForUploadResp>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/cc.arduino.cli.commands.ArduinoCore/ListProgrammersAvailableForUpload",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Burn bootloader to a board."]
pub async fn burn_bootloader(
&mut self,
request: impl tonic::IntoRequest<super::BurnBootloaderReq>,
) -> Result<
tonic::Response<tonic::codec::Streaming<super::BurnBootloaderResp>>,
tonic::Status,
> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/cc.arduino.cli.commands.ArduinoCore/BurnBootloader",
);
self.inner
.server_streaming(request.into_request(), path, codec)
.await
}
#[doc = " Search for a platform in the platforms indexes."]
pub async fn platform_search(
&mut self,
request: impl tonic::IntoRequest<super::PlatformSearchReq>,
) -> Result<tonic::Response<super::PlatformSearchResp>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/cc.arduino.cli.commands.ArduinoCore/PlatformSearch",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " List all installed platforms."]
pub async fn platform_list(
&mut self,
request: impl tonic::IntoRequest<super::PlatformListReq>,
) -> Result<tonic::Response<super::PlatformListResp>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/cc.arduino.cli.commands.ArduinoCore/PlatformList",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Download the archive file of an Arduino library in the libraries index to"]
#[doc = " the staging directory."]
pub async fn library_download(
&mut self,
request: impl tonic::IntoRequest<super::LibraryDownloadReq>,
) -> Result<
tonic::Response<tonic::codec::Streaming<super::LibraryDownloadResp>>,
tonic::Status,
> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/cc.arduino.cli.commands.ArduinoCore/LibraryDownload",
);
self.inner
.server_streaming(request.into_request(), path, codec)
.await
}
#[doc = " Download and install an Arduino library from the libraries index."]
pub async fn library_install(
&mut self,
request: impl tonic::IntoRequest<super::LibraryInstallReq>,
) -> Result<
tonic::Response<tonic::codec::Streaming<super::LibraryInstallResp>>,
tonic::Status,
> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/cc.arduino.cli.commands.ArduinoCore/LibraryInstall",
);
self.inner
.server_streaming(request.into_request(), path, codec)
.await
}
#[doc = " Install a library from a Zip File "]
pub async fn zip_library_install(
&mut self,
request: impl tonic::IntoRequest<super::ZipLibraryInstallReq>,
) -> Result<
tonic::Response<tonic::codec::Streaming<super::ZipLibraryInstallResp>>,
tonic::Status,
> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/cc.arduino.cli.commands.ArduinoCore/ZipLibraryInstall",
);
self.inner
.server_streaming(request.into_request(), path, codec)
.await
}
#[doc = " Download and install a library from a git url"]
pub async fn git_library_install(
&mut self,
request: impl tonic::IntoRequest<super::GitLibraryInstallReq>,
) -> Result<
tonic::Response<tonic::codec::Streaming<super::GitLibraryInstallResp>>,
tonic::Status,
> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/cc.arduino.cli.commands.ArduinoCore/GitLibraryInstall",
);
self.inner
.server_streaming(request.into_request(), path, codec)
.await
}
#[doc = " Uninstall an Arduino library."]
pub async fn library_uninstall(
&mut self,
request: impl tonic::IntoRequest<super::LibraryUninstallReq>,
) -> Result<
tonic::Response<tonic::codec::Streaming<super::LibraryUninstallResp>>,
tonic::Status,
> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/cc.arduino.cli.commands.ArduinoCore/LibraryUninstall",
);
self.inner
.server_streaming(request.into_request(), path, codec)
.await
}
#[doc = " Upgrade all installed Arduino libraries to the newest version available."]
pub async fn library_upgrade_all(
&mut self,
request: impl tonic::IntoRequest<super::LibraryUpgradeAllReq>,
) -> Result<
tonic::Response<tonic::codec::Streaming<super::LibraryUpgradeAllResp>>,
tonic::Status,
> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/cc.arduino.cli.commands.ArduinoCore/LibraryUpgradeAll",
);
self.inner
.server_streaming(request.into_request(), path, codec)
.await
}
#[doc = " List the recursive dependencies of a library, as defined by the `depends`"]
#[doc = " field of the library.properties files."]
pub async fn library_resolve_dependencies(
&mut self,
request: impl tonic::IntoRequest<super::LibraryResolveDependenciesReq>,
) -> Result<tonic::Response<super::LibraryResolveDependenciesResp>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/cc.arduino.cli.commands.ArduinoCore/LibraryResolveDependencies",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Search the Arduino libraries index for libraries."]
pub async fn library_search(
&mut self,
request: impl tonic::IntoRequest<super::LibrarySearchReq>,
) -> Result<tonic::Response<super::LibrarySearchResp>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/cc.arduino.cli.commands.ArduinoCore/LibrarySearch",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " List the installed libraries."]
pub async fn library_list(
&mut self,
request: impl tonic::IntoRequest<super::LibraryListReq>,
) -> Result<tonic::Response<super::LibraryListResp>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/cc.arduino.cli.commands.ArduinoCore/LibraryList",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
impl<T: Clone> Clone for ArduinoCoreClient<T> {
fn clone(&self) -> Self {
Self {
inner: self.inner.clone(),
}
}
}
impl<T> std::fmt::Debug for ArduinoCoreClient<T> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ArduinoCoreClient {{ ... }}")
}
}
}