export namespace main { export class ImageResult { code: number; message: string; data?: string; static createFrom(source: any = {}) { return new ImageResult(source); } constructor(source: any = {}) { if ('string' === typeof source) source = JSON.parse(source); this.code = source["code"]; this.message = source["message"]; this.data = source["data"]; } } }