Files
Reims-Go/frontend/wailsjs/go/models.ts
T
NwflowerandClaude Opus 5.5 c0f08be124 feat: per-VM CPU affinity, disk snapshots, SSH helpers and VM window actions
Backend
- Per-VM CPU affinity (vmstart/affinity.go, affinity_flow.go): modes auto /
  all / P-cores / non-LP-E / custom, saved in the VM folder, applied to the
  QEMU process on start (GUI and CLI) and live via SetVMAffinity; copied on
  clone. Start summary logs the resolved mapping. Host report gains CPU
  topology helpers (mask <-> CPU list).
- Offline qcow2 restore points via qemu-img (driver/reims/snapshot.go,
  snapshot_flow.go): list / create / restore / delete.
- SSH helpers (ssh_flow.go): remembered user, open a terminal, write an
  ~/.ssh/config entry, open VS Code Remote-SSH.
- FocusVMWindow brings the QEMU window forward (restoring it if minimized);
  CopyVMScreenshot copies a full-resolution frame to the clipboard.
- DeliverPathsToGuest copies dropped host files into the shared folder;
  main.go enables Wails file drop on elements marked --wails-drop-target.
- VM note (.reims-go-note) and a storage breakdown (extras_flow.go).

Frontend
- VM page: running state's "Show Window" and the screen preview use
  FocusVMWindow; camera button and More-menu item copy a screenshot;
  editable note under the name; SSH row shows the saved user with
  Terminal / config / VS Code actions; restore-point list; install guide
  steps can be ticked off; drop files onto the page to send them.
- Sidebar right-click menu per VM (start, show window, screenshot, stop,
  restart, settings, folders, clone, delete); double-click and Ctrl+Enter
  still run the main action.
- AffinityDialog opened from the VM menu and VM settings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 04:00:48 -07:00

1171 lines
36 KiB
TypeScript

export namespace app {
export class AppState {
config?: config.Config;
host: host.Report;
optimizations: host.Optimization[];
runtimes: runtime.Installed[];
active_runtime?: runtime.Installed;
vms: reims.VMListItem[];
transitions: Record<string, string>;
pending_changes: Record<string, Array<PendingChange>>;
needs_setup: boolean;
app_version: string;
static createFrom(source: any = {}) {
return new AppState(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.config = this.convertValues(source["config"], config.Config);
this.host = this.convertValues(source["host"], host.Report);
this.optimizations = this.convertValues(source["optimizations"], host.Optimization);
this.runtimes = this.convertValues(source["runtimes"], runtime.Installed);
this.active_runtime = this.convertValues(source["active_runtime"], runtime.Installed);
this.vms = this.convertValues(source["vms"], reims.VMListItem);
this.transitions = source["transitions"];
this.pending_changes = this.convertValues(source["pending_changes"], Array<PendingChange>, true);
this.needs_setup = source["needs_setup"];
this.app_version = source["app_version"];
}
convertValues(a: any, classs: any, asMap: boolean = false): any {
if (!a) {
return a;
}
if (a.slice && a.map) {
return (a as any[]).map(elem => this.convertValues(elem, classs));
} else if ("object" === typeof a) {
if (asMap) {
for (const key of Object.keys(a)) {
a[key] = new classs(a[key]);
}
return a;
}
return new classs(a);
}
return a;
}
}
export class DataRootCheck {
path: string;
free_gb: number;
system: boolean;
external: boolean;
has_config: boolean;
error?: string;
static createFrom(source: any = {}) {
return new DataRootCheck(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.path = source["path"];
this.free_gb = source["free_gb"];
this.system = source["system"];
this.external = source["external"];
this.has_config = source["has_config"];
this.error = source["error"];
}
}
export class DataRootChoice {
path: string;
free_gb: number;
system: boolean;
external: boolean;
recommended: boolean;
static createFrom(source: any = {}) {
return new DataRootChoice(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.path = source["path"];
this.free_gb = source["free_gb"];
this.system = source["system"];
this.external = source["external"];
this.recommended = source["recommended"];
}
}
export class DriveShareInfo {
drive: string;
root: string;
selected: boolean;
system: boolean;
static createFrom(source: any = {}) {
return new DriveShareInfo(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.drive = source["drive"];
this.root = source["root"];
this.selected = source["selected"];
this.system = source["system"];
}
}
export class DriveShareSettings {
enabled: boolean;
read_only: boolean;
required_agent_version: number;
drives: DriveShareInfo[];
static createFrom(source: any = {}) {
return new DriveShareSettings(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.enabled = source["enabled"];
this.read_only = source["read_only"];
this.required_agent_version = source["required_agent_version"];
this.drives = this.convertValues(source["drives"], DriveShareInfo);
}
convertValues(a: any, classs: any, asMap: boolean = false): any {
if (!a) {
return a;
}
if (a.slice && a.map) {
return (a as any[]).map(elem => this.convertValues(elem, classs));
} else if ("object" === typeof a) {
if (asMap) {
for (const key of Object.keys(a)) {
a[key] = new classs(a[key]);
}
return a;
}
return new classs(a);
}
return a;
}
}
export class PendingChange {
field: string;
from: string;
to: string;
static createFrom(source: any = {}) {
return new PendingChange(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.field = source["field"];
this.from = source["from"];
this.to = source["to"];
}
}
export class VMStorageItem {
name: string;
bytes: number;
static createFrom(source: any = {}) {
return new VMStorageItem(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.name = source["name"];
this.bytes = source["bytes"];
}
}
export class StorageBreakdown {
vms_bytes: number;
installers_bytes: number;
runtimes_bytes: number;
total_bytes: number;
vms: VMStorageItem[];
static createFrom(source: any = {}) {
return new StorageBreakdown(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.vms_bytes = source["vms_bytes"];
this.installers_bytes = source["installers_bytes"];
this.runtimes_bytes = source["runtimes_bytes"];
this.total_bytes = source["total_bytes"];
this.vms = this.convertValues(source["vms"], VMStorageItem);
}
convertValues(a: any, classs: any, asMap: boolean = false): any {
if (!a) {
return a;
}
if (a.slice && a.map) {
return (a as any[]).map(elem => this.convertValues(elem, classs));
} else if ("object" === typeof a) {
if (asMap) {
for (const key of Object.keys(a)) {
a[key] = new classs(a[key]);
}
return a;
}
return new classs(a);
}
return a;
}
}
export class Task {
id: string;
kind: string;
subject: string;
vm?: string;
step: string;
done: number;
total: number;
percent: number;
rate: number;
status: string;
error?: string;
result?: string;
cancelable: boolean;
started_at: number;
updated_at: number;
static createFrom(source: any = {}) {
return new Task(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.id = source["id"];
this.kind = source["kind"];
this.subject = source["subject"];
this.vm = source["vm"];
this.step = source["step"];
this.done = source["done"];
this.total = source["total"];
this.percent = source["percent"];
this.rate = source["rate"];
this.status = source["status"];
this.error = source["error"];
this.result = source["result"];
this.cancelable = source["cancelable"];
this.started_at = source["started_at"];
this.updated_at = source["updated_at"];
}
}
export class VMAffinityStatus {
mode: string;
cpus: number[];
disable_eco_qos: boolean;
effective_mode: string;
effective_cpus: number[];
effective_mask_hex: string;
vcpus: number;
oversubscribed: boolean;
running: boolean;
pid?: number;
live_cpus?: number[];
live_mask_hex?: string;
live_read_error?: string;
static createFrom(source: any = {}) {
return new VMAffinityStatus(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.mode = source["mode"];
this.cpus = source["cpus"];
this.disable_eco_qos = source["disable_eco_qos"];
this.effective_mode = source["effective_mode"];
this.effective_cpus = source["effective_cpus"];
this.effective_mask_hex = source["effective_mask_hex"];
this.vcpus = source["vcpus"];
this.oversubscribed = source["oversubscribed"];
this.running = source["running"];
this.pid = source["pid"];
this.live_cpus = source["live_cpus"];
this.live_mask_hex = source["live_mask_hex"];
this.live_read_error = source["live_read_error"];
}
}
export class VMAffinityUpdate {
mode: string;
cpus?: number[];
disable_eco_qos: boolean;
static createFrom(source: any = {}) {
return new VMAffinityUpdate(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.mode = source["mode"];
this.cpus = source["cpus"];
this.disable_eco_qos = source["disable_eco_qos"];
}
}
export class VMStats {
name: string;
running: boolean;
pid?: number;
cpu_percent: number;
memory_rss_bytes: number;
memory_private_bytes: number;
disk_actual_bytes: number;
disk_virtual_bytes: number;
disk_format?: string;
uptime_seconds: number;
guest_tools_connected: boolean;
guest_tools_mount_mode?: string;
guest_tools_sleep_guard: boolean;
static createFrom(source: any = {}) {
return new VMStats(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.name = source["name"];
this.running = source["running"];
this.pid = source["pid"];
this.cpu_percent = source["cpu_percent"];
this.memory_rss_bytes = source["memory_rss_bytes"];
this.memory_private_bytes = source["memory_private_bytes"];
this.disk_actual_bytes = source["disk_actual_bytes"];
this.disk_virtual_bytes = source["disk_virtual_bytes"];
this.disk_format = source["disk_format"];
this.uptime_seconds = source["uptime_seconds"];
this.guest_tools_connected = source["guest_tools_connected"];
this.guest_tools_mount_mode = source["guest_tools_mount_mode"];
this.guest_tools_sleep_guard = source["guest_tools_sleep_guard"];
}
}
export class VMThumbnail {
data_url: string;
captured_at: number;
live: boolean;
static createFrom(source: any = {}) {
return new VMThumbnail(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.data_url = source["data_url"];
this.captured_at = source["captured_at"];
this.live = source["live"];
}
}
}
export namespace config {
export class Config {
data_root: string;
locale: string;
active_runtime?: string;
auto_pin_pcores: boolean;
default_gpu?: string;
runtime_channel?: string;
runtime_source?: string;
minimize_to_tray?: boolean;
static createFrom(source: any = {}) {
return new Config(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.data_root = source["data_root"];
this.locale = source["locale"];
this.active_runtime = source["active_runtime"];
this.auto_pin_pcores = source["auto_pin_pcores"];
this.default_gpu = source["default_gpu"];
this.runtime_channel = source["runtime_channel"];
this.runtime_source = source["runtime_source"];
this.minimize_to_tray = source["minimize_to_tray"];
}
}
}
export namespace host {
export class AudioInfo {
output_count: number;
input_count: number;
output_devices?: string[];
input_devices?: string[];
default_backend?: string;
static createFrom(source: any = {}) {
return new AudioInfo(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.output_count = source["output_count"];
this.input_count = source["input_count"];
this.output_devices = source["output_devices"];
this.input_devices = source["input_devices"];
this.default_backend = source["default_backend"];
}
}
export class DisplayInfo {
name?: string;
width: number;
height: number;
scale_pct: number;
refresh_hz?: number;
primary: boolean;
work_width?: number;
work_height?: number;
static createFrom(source: any = {}) {
return new DisplayInfo(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.name = source["name"];
this.width = source["width"];
this.height = source["height"];
this.scale_pct = source["scale_pct"];
this.refresh_hz = source["refresh_hz"];
this.primary = source["primary"];
this.work_width = source["work_width"];
this.work_height = source["work_height"];
}
}
export class DisplayPreset {
resolution: string;
label: string;
hidpi: boolean;
recommended?: boolean;
static createFrom(source: any = {}) {
return new DisplayPreset(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.resolution = source["resolution"];
this.label = source["label"];
this.hidpi = source["hidpi"];
this.recommended = source["recommended"];
}
}
export class GPUInfo {
name: string;
vulkan_icd: string;
kind: string;
static createFrom(source: any = {}) {
return new GPUInfo(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.name = source["name"];
this.vulkan_icd = source["vulkan_icd"];
this.kind = source["kind"];
}
}
export class LogicalCPUInfo {
index: number;
core_index: number;
tier: string;
smt: boolean;
static createFrom(source: any = {}) {
return new LogicalCPUInfo(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.index = source["index"];
this.core_index = source["core_index"];
this.tier = source["tier"];
this.smt = source["smt"];
}
}
export class Optimization {
id: string;
status: string;
supported: boolean;
recommended: boolean;
detail?: string;
static createFrom(source: any = {}) {
return new Optimization(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.id = source["id"];
this.status = source["status"];
this.supported = source["supported"];
this.recommended = source["recommended"];
this.detail = source["detail"];
}
}
export class WHPXCapabilities {
modern_os: boolean;
apic_emulation: boolean;
kernel_irqchip_available: boolean;
nested_virt_property: boolean;
nested_virt_probe_error?: string;
static createFrom(source: any = {}) {
return new WHPXCapabilities(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.modern_os = source["modern_os"];
this.apic_emulation = source["apic_emulation"];
this.kernel_irqchip_available = source["kernel_irqchip_available"];
this.nested_virt_property = source["nested_virt_property"];
this.nested_virt_probe_error = source["nested_virt_probe_error"];
}
}
export class Report {
os: string;
arch: string;
logical_cpus: number;
physical_cores: number;
has_hybrid_cores: boolean;
p_core_count: number;
e_core_count: number;
lpe_core_count?: number;
p_core_mask: number;
p_core_mask_hex: string;
p_core_logical_cpus?: number[];
e_core_logical_cpus?: number[];
non_lpe_mask?: number;
non_lpe_mask_hex?: string;
non_lpe_logical_cpus?: number[];
cpu_topology?: LogicalCPUInfo[];
total_ram_gb: number;
avail_ram_gb: number;
memory_load_pct: number;
commit_avail_gb: number;
commit_limit_gb: number;
data_root: string;
data_root_drive_type?: string;
free_disk_gb: number;
whpx: string;
whpx_caps: WHPXCapabilities;
needs_cold_reboot_workaround: boolean;
gpus: GPUInfo[];
recommended_gpu?: GPUInfo;
displays?: DisplayInfo[];
primary_display?: DisplayInfo;
recommended_resolution?: string;
display_presets?: DisplayPreset[];
hidpi_advice?: string;
fullscreen_hidpi: boolean;
processor_scheduling?: string;
audio: AudioInfo;
static createFrom(source: any = {}) {
return new Report(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.os = source["os"];
this.arch = source["arch"];
this.logical_cpus = source["logical_cpus"];
this.physical_cores = source["physical_cores"];
this.has_hybrid_cores = source["has_hybrid_cores"];
this.p_core_count = source["p_core_count"];
this.e_core_count = source["e_core_count"];
this.lpe_core_count = source["lpe_core_count"];
this.p_core_mask = source["p_core_mask"];
this.p_core_mask_hex = source["p_core_mask_hex"];
this.p_core_logical_cpus = source["p_core_logical_cpus"];
this.e_core_logical_cpus = source["e_core_logical_cpus"];
this.non_lpe_mask = source["non_lpe_mask"];
this.non_lpe_mask_hex = source["non_lpe_mask_hex"];
this.non_lpe_logical_cpus = source["non_lpe_logical_cpus"];
this.cpu_topology = this.convertValues(source["cpu_topology"], LogicalCPUInfo);
this.total_ram_gb = source["total_ram_gb"];
this.avail_ram_gb = source["avail_ram_gb"];
this.memory_load_pct = source["memory_load_pct"];
this.commit_avail_gb = source["commit_avail_gb"];
this.commit_limit_gb = source["commit_limit_gb"];
this.data_root = source["data_root"];
this.data_root_drive_type = source["data_root_drive_type"];
this.free_disk_gb = source["free_disk_gb"];
this.whpx = source["whpx"];
this.whpx_caps = this.convertValues(source["whpx_caps"], WHPXCapabilities);
this.needs_cold_reboot_workaround = source["needs_cold_reboot_workaround"];
this.gpus = this.convertValues(source["gpus"], GPUInfo);
this.recommended_gpu = this.convertValues(source["recommended_gpu"], GPUInfo);
this.displays = this.convertValues(source["displays"], DisplayInfo);
this.primary_display = this.convertValues(source["primary_display"], DisplayInfo);
this.recommended_resolution = source["recommended_resolution"];
this.display_presets = this.convertValues(source["display_presets"], DisplayPreset);
this.hidpi_advice = source["hidpi_advice"];
this.fullscreen_hidpi = source["fullscreen_hidpi"];
this.processor_scheduling = source["processor_scheduling"];
this.audio = this.convertValues(source["audio"], AudioInfo);
}
convertValues(a: any, classs: any, asMap: boolean = false): any {
if (!a) {
return a;
}
if (a.slice && a.map) {
return (a as any[]).map(elem => this.convertValues(elem, classs));
} else if ("object" === typeof a) {
if (asMap) {
for (const key of Object.keys(a)) {
a[key] = new classs(a[key]);
}
return a;
}
return new classs(a);
}
return a;
}
}
}
export namespace installer {
export class Cached {
name: string;
path: string;
bytes: number;
kind: string;
partial: boolean;
title?: string;
version?: string;
build?: string;
static createFrom(source: any = {}) {
return new Cached(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.name = source["name"];
this.path = source["path"];
this.bytes = source["bytes"];
this.kind = source["kind"];
this.partial = source["partial"];
this.title = source["title"];
this.version = source["version"];
this.build = source["build"];
}
}
export class Release {
product: string;
title: string;
version: string;
build: string;
posted: string;
size: number;
static createFrom(source: any = {}) {
return new Release(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.product = source["product"];
this.title = source["title"];
this.version = source["version"];
this.build = source["build"];
this.posted = source["posted"];
this.size = source["size"];
}
}
}
export namespace reims {
export class CreateOpts {
name: string;
dir?: string;
source_mode?: string;
macos?: string;
offline?: boolean;
installer?: string;
cpus?: number;
memory?: string;
disk_size?: string;
disk?: string;
disk_mode?: string;
disk_controller?: string;
graphics?: string;
gpu?: string;
resolution?: string;
displays?: number;
borderless?: boolean;
capture?: boolean;
audio?: boolean;
network?: boolean;
ssh_port?: number;
logs?: boolean;
guest_lang?: string;
start?: boolean;
static createFrom(source: any = {}) {
return new CreateOpts(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.name = source["name"];
this.dir = source["dir"];
this.source_mode = source["source_mode"];
this.macos = source["macos"];
this.offline = source["offline"];
this.installer = source["installer"];
this.cpus = source["cpus"];
this.memory = source["memory"];
this.disk_size = source["disk_size"];
this.disk = source["disk"];
this.disk_mode = source["disk_mode"];
this.disk_controller = source["disk_controller"];
this.graphics = source["graphics"];
this.gpu = source["gpu"];
this.resolution = source["resolution"];
this.displays = source["displays"];
this.borderless = source["borderless"];
this.capture = source["capture"];
this.audio = source["audio"];
this.network = source["network"];
this.ssh_port = source["ssh_port"];
this.logs = source["logs"];
this.guest_lang = source["guest_lang"];
this.start = source["start"];
}
}
export class DiskCompactResult {
path: string;
before_bytes: number;
after_bytes: number;
reclaimed_bytes: number;
static createFrom(source: any = {}) {
return new DiskCompactResult(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.path = source["path"];
this.before_bytes = source["before_bytes"];
this.after_bytes = source["after_bytes"];
this.reclaimed_bytes = source["reclaimed_bytes"];
}
}
export class DiskResizeResult {
path: string;
old_virtual_bytes: number;
new_virtual_bytes: number;
guest_expand_cmd: string;
static createFrom(source: any = {}) {
return new DiskResizeResult(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.path = source["path"];
this.old_virtual_bytes = source["old_virtual_bytes"];
this.new_virtual_bytes = source["new_virtual_bytes"];
this.guest_expand_cmd = source["guest_expand_cmd"];
}
}
export class DiskSnapshot {
id: string;
name: string;
created_at: number;
vm_state_bytes: number;
static createFrom(source: any = {}) {
return new DiskSnapshot(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.id = source["id"];
this.name = source["name"];
this.created_at = source["created_at"];
this.vm_state_bytes = source["vm_state_bytes"];
}
}
export class SetOpts {
name: string;
cpus?: number;
memory?: string;
graphics?: string;
displays?: number;
disk_controller?: string;
resolution?: string;
borderless?: boolean;
capture?: boolean;
gpu?: string;
logs?: boolean;
log_level?: string;
audio?: boolean;
audio_backend?: string;
network?: boolean;
ssh_port?: number;
stop_timeout?: number;
extra_args?: string;
env?: string[];
guest_lang?: string;
static createFrom(source: any = {}) {
return new SetOpts(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.name = source["name"];
this.cpus = source["cpus"];
this.memory = source["memory"];
this.graphics = source["graphics"];
this.displays = source["displays"];
this.disk_controller = source["disk_controller"];
this.resolution = source["resolution"];
this.borderless = source["borderless"];
this.capture = source["capture"];
this.gpu = source["gpu"];
this.logs = source["logs"];
this.log_level = source["log_level"];
this.audio = source["audio"];
this.audio_backend = source["audio_backend"];
this.network = source["network"];
this.ssh_port = source["ssh_port"];
this.stop_timeout = source["stop_timeout"];
this.extra_args = source["extra_args"];
this.env = source["env"];
this.guest_lang = source["guest_lang"];
}
}
export class VMDetail {
name: string;
state: string;
kind: string;
directory: string;
cpus: number;
memory: string;
disk: string;
disk_controller: string;
graphics: string;
display: string;
displays: number;
resolution: string;
gpu: string;
has_opencore: boolean;
has_installer: boolean;
recovery_mode: boolean;
installer_path?: string;
cpu_model: string;
audio: boolean;
audio_backend?: string;
audio_raw: string;
network: boolean;
network_summary: string;
ssh_port: number;
logs: boolean;
log_level: string;
stop_timeout: number;
capture: boolean;
borderless: boolean;
extra_args: string;
guest_tools_attached: boolean;
guest_tools_configured: boolean;
guest_tools_connected: boolean;
guest_tools_mount_mode?: string;
guest_tools_prevent_sleep: boolean;
guest_tools_sleep_active: boolean;
guest_tools_agent_version?: number;
shared_dir?: string;
guest_lang?: string;
static createFrom(source: any = {}) {
return new VMDetail(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.name = source["name"];
this.state = source["state"];
this.kind = source["kind"];
this.directory = source["directory"];
this.cpus = source["cpus"];
this.memory = source["memory"];
this.disk = source["disk"];
this.disk_controller = source["disk_controller"];
this.graphics = source["graphics"];
this.display = source["display"];
this.displays = source["displays"];
this.resolution = source["resolution"];
this.gpu = source["gpu"];
this.has_opencore = source["has_opencore"];
this.has_installer = source["has_installer"];
this.recovery_mode = source["recovery_mode"];
this.installer_path = source["installer_path"];
this.cpu_model = source["cpu_model"];
this.audio = source["audio"];
this.audio_backend = source["audio_backend"];
this.audio_raw = source["audio_raw"];
this.network = source["network"];
this.network_summary = source["network_summary"];
this.ssh_port = source["ssh_port"];
this.logs = source["logs"];
this.log_level = source["log_level"];
this.stop_timeout = source["stop_timeout"];
this.capture = source["capture"];
this.borderless = source["borderless"];
this.extra_args = source["extra_args"];
this.guest_tools_attached = source["guest_tools_attached"];
this.guest_tools_configured = source["guest_tools_configured"];
this.guest_tools_connected = source["guest_tools_connected"];
this.guest_tools_mount_mode = source["guest_tools_mount_mode"];
this.guest_tools_prevent_sleep = source["guest_tools_prevent_sleep"];
this.guest_tools_sleep_active = source["guest_tools_sleep_active"];
this.guest_tools_agent_version = source["guest_tools_agent_version"];
this.shared_dir = source["shared_dir"];
this.guest_lang = source["guest_lang"];
}
}
export class VMListItem {
name: string;
dir: string;
pid?: number;
state: string;
static createFrom(source: any = {}) {
return new VMListItem(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.name = source["name"];
this.dir = source["dir"];
this.pid = source["pid"];
this.state = source["state"];
}
}
export class ValidationIssue {
field: string;
code: string;
message: string;
static createFrom(source: any = {}) {
return new ValidationIssue(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.field = source["field"];
this.code = source["code"];
this.message = source["message"];
}
}
}
export namespace runtime {
export class Patch {
name: string;
target: string;
sha256: string;
static createFrom(source: any = {}) {
return new Patch(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.name = source["name"];
this.target = source["target"];
this.sha256 = source["sha256"];
}
}
export class Manifest {
schema_version: number;
name: string;
platform: string;
upstream_repo: string;
commit: string;
full_commit: string;
qemu_version: string;
util_version: string;
built_at: string;
file_count: number;
dll_count: number;
raw_bytes: number;
sha256: Record<string, string>;
vendor_qemu_commit?: string;
util_commit?: string;
metal2vulkan_commit?: string;
patches?: Patch[];
channel?: string;
source_package?: string;
static createFrom(source: any = {}) {
return new Manifest(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.schema_version = source["schema_version"];
this.name = source["name"];
this.platform = source["platform"];
this.upstream_repo = source["upstream_repo"];
this.commit = source["commit"];
this.full_commit = source["full_commit"];
this.qemu_version = source["qemu_version"];
this.util_version = source["util_version"];
this.built_at = source["built_at"];
this.file_count = source["file_count"];
this.dll_count = source["dll_count"];
this.raw_bytes = source["raw_bytes"];
this.sha256 = source["sha256"];
this.vendor_qemu_commit = source["vendor_qemu_commit"];
this.util_commit = source["util_commit"];
this.metal2vulkan_commit = source["metal2vulkan_commit"];
this.patches = this.convertValues(source["patches"], Patch);
this.channel = source["channel"];
this.source_package = source["source_package"];
}
convertValues(a: any, classs: any, asMap: boolean = false): any {
if (!a) {
return a;
}
if (a.slice && a.map) {
return (a as any[]).map(elem => this.convertValues(elem, classs));
} else if ("object" === typeof a) {
if (asMap) {
for (const key of Object.keys(a)) {
a[key] = new classs(a[key]);
}
return a;
}
return new classs(a);
}
return a;
}
}
export class Installed {
commit: string;
dir: string;
active: boolean;
manifest: Manifest;
static createFrom(source: any = {}) {
return new Installed(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.commit = source["commit"];
this.dir = source["dir"];
this.active = source["active"];
this.manifest = this.convertValues(source["manifest"], Manifest);
}
convertValues(a: any, classs: any, asMap: boolean = false): any {
if (!a) {
return a;
}
if (a.slice && a.map) {
return (a as any[]).map(elem => this.convertValues(elem, classs));
} else if ("object" === typeof a) {
if (asMap) {
for (const key of Object.keys(a)) {
a[key] = new classs(a[key]);
}
return a;
}
return new classs(a);
}
return a;
}
}
export class Remote {
commit: string;
tag: string;
channel: string;
source?: string;
published_at: string;
page_url: string;
archive_name: string;
archive_url: string;
archive_size: number;
sums_url: string;
source_name?: string;
source_url?: string;
static createFrom(source: any = {}) {
return new Remote(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.commit = source["commit"];
this.tag = source["tag"];
this.channel = source["channel"];
this.source = source["source"];
this.published_at = source["published_at"];
this.page_url = source["page_url"];
this.archive_name = source["archive_name"];
this.archive_url = source["archive_url"];
this.archive_size = source["archive_size"];
this.sums_url = source["sums_url"];
this.source_name = source["source_name"];
this.source_url = source["source_url"];
}
}
}
export namespace version {
export class UpdateInfo {
current: string;
latest: string;
has_update: boolean;
page_url?: string;
download_url?: string;
asset_name?: string;
asset_size?: number;
published_at?: string;
static createFrom(source: any = {}) {
return new UpdateInfo(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.current = source["current"];
this.latest = source["latest"];
this.has_update = source["has_update"];
this.page_url = source["page_url"];
this.download_url = source["download_url"];
this.asset_name = source["asset_name"];
this.asset_size = source["asset_size"];
this.published_at = source["published_at"];
}
}
}