export namespace main { export class CharacterInfo { character_id: number; character_name: string; waypoint_enabled: boolean; static createFrom(source: any = {}) { return new CharacterInfo(source); } constructor(source: any = {}) { if ('string' === typeof source) source = JSON.parse(source); this.character_id = source["character_id"]; this.character_name = source["character_name"]; this.waypoint_enabled = source["waypoint_enabled"]; } } export class CharacterLocation { character_id: number; character_name: string; solar_system_id: number; solar_system_name: string; // Go type: time retrieved_at: any; static createFrom(source: any = {}) { return new CharacterLocation(source); } constructor(source: any = {}) { if ('string' === typeof source) source = JSON.parse(source); this.character_id = source["character_id"]; this.character_name = source["character_name"]; this.solar_system_id = source["solar_system_id"]; this.solar_system_name = source["solar_system_name"]; this.retrieved_at = this.convertValues(source["retrieved_at"], null); } 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 SystemRegion { system: string; region: string; static createFrom(source: any = {}) { return new SystemRegion(source); } constructor(source: any = {}) { if ('string' === typeof source) source = JSON.parse(source); this.system = source["system"]; this.region = source["region"]; } } }