51 lines
1.2 KiB
TypeScript
51 lines
1.2 KiB
TypeScript
export namespace core {
|
|
|
|
export class AppSettings {
|
|
RunOnStartup: boolean;
|
|
AutoConnect: boolean;
|
|
AutoReconnect: boolean;
|
|
LastConfigId?: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new AppSettings(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.RunOnStartup = source["RunOnStartup"];
|
|
this.AutoConnect = source["AutoConnect"];
|
|
this.AutoReconnect = source["AutoReconnect"];
|
|
this.LastConfigId = source["LastConfigId"];
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
export namespace main {
|
|
|
|
export class VpnConfigItem {
|
|
id: string;
|
|
name: string;
|
|
link: string;
|
|
protocolType: string;
|
|
ping: string;
|
|
pingColor: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new VpnConfigItem(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.id = source["id"];
|
|
this.name = source["name"];
|
|
this.link = source["link"];
|
|
this.protocolType = source["protocolType"];
|
|
this.ping = source["ping"];
|
|
this.pingColor = source["pingColor"];
|
|
}
|
|
}
|
|
|
|
}
|
|
|