rigs completed
This commit is contained in:
@@ -257,6 +257,28 @@ export namespace lookup {
|
||||
|
||||
export namespace main {
|
||||
|
||||
export class BackupSettings {
|
||||
enabled: boolean;
|
||||
folder: string;
|
||||
rotation: number;
|
||||
zip: boolean;
|
||||
last_backup_at: string;
|
||||
default_folder: string;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new BackupSettings(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.enabled = source["enabled"];
|
||||
this.folder = source["folder"];
|
||||
this.rotation = source["rotation"];
|
||||
this.zip = source["zip"];
|
||||
this.last_backup_at = source["last_backup_at"];
|
||||
this.default_folder = source["default_folder"];
|
||||
}
|
||||
}
|
||||
export class CATSettings {
|
||||
enabled: boolean;
|
||||
backend: string;
|
||||
@@ -413,6 +435,7 @@ export namespace main {
|
||||
country?: string;
|
||||
continent?: string;
|
||||
status: string;
|
||||
worked_call: boolean;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new SpotStatus(source);
|
||||
@@ -426,6 +449,7 @@ export namespace main {
|
||||
this.country = source["country"];
|
||||
this.continent = source["continent"];
|
||||
this.status = source["status"];
|
||||
this.worked_call = source["worked_call"];
|
||||
}
|
||||
}
|
||||
export class StartupStatus {
|
||||
@@ -469,6 +493,124 @@ export namespace main {
|
||||
|
||||
}
|
||||
|
||||
export namespace operating {
|
||||
|
||||
export class AntennaBand {
|
||||
band: string;
|
||||
is_default: boolean;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new AntennaBand(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.band = source["band"];
|
||||
this.is_default = source["is_default"];
|
||||
}
|
||||
}
|
||||
export class Antenna {
|
||||
id: number;
|
||||
station_id: number;
|
||||
name: string;
|
||||
sort_order: number;
|
||||
bands: AntennaBand[];
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new Antenna(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.id = source["id"];
|
||||
this.station_id = source["station_id"];
|
||||
this.name = source["name"];
|
||||
this.sort_order = source["sort_order"];
|
||||
this.bands = this.convertValues(source["bands"], AntennaBand);
|
||||
}
|
||||
|
||||
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 BandDefault {
|
||||
station_id: number;
|
||||
station_name: string;
|
||||
antenna_id: number;
|
||||
antenna_name: string;
|
||||
tx_pwr?: number;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new BandDefault(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.station_id = source["station_id"];
|
||||
this.station_name = source["station_name"];
|
||||
this.antenna_id = source["antenna_id"];
|
||||
this.antenna_name = source["antenna_name"];
|
||||
this.tx_pwr = source["tx_pwr"];
|
||||
}
|
||||
}
|
||||
export class Station {
|
||||
id: number;
|
||||
profile_id: number;
|
||||
name: string;
|
||||
tx_pwr?: number;
|
||||
sort_order: number;
|
||||
antennas?: Antenna[];
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new Station(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.id = source["id"];
|
||||
this.profile_id = source["profile_id"];
|
||||
this.name = source["name"];
|
||||
this.tx_pwr = source["tx_pwr"];
|
||||
this.sort_order = source["sort_order"];
|
||||
this.antennas = this.convertValues(source["antennas"], Antenna);
|
||||
}
|
||||
|
||||
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 profile {
|
||||
|
||||
export class Profile {
|
||||
|
||||
Reference in New Issue
Block a user