export namespace main { export class OtherField { ID: number; // Go type: time CreatedAt: any; // Go type: time UpdatedAt: any; // Go type: gorm DeletedAt: any; ContactID: number; Key: string; Value: string; static createFrom(source: any = {}) { return new OtherField(source); } constructor(source: any = {}) { if ('string' === typeof source) source = JSON.parse(source); this.ID = source["ID"]; this.CreatedAt = this.convertValues(source["CreatedAt"], null); this.UpdatedAt = this.convertValues(source["UpdatedAt"], null); this.DeletedAt = this.convertValues(source["DeletedAt"], null); this.ContactID = source["ContactID"]; this.Key = source["Key"]; this.Value = source["Value"]; } 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 Date { ID: number; // Go type: time CreatedAt: any; // Go type: time UpdatedAt: any; // Go type: gorm DeletedAt: any; ContactID: number; Key: string; // Go type: time Value: any; static createFrom(source: any = {}) { return new Date(source); } constructor(source: any = {}) { if ('string' === typeof source) source = JSON.parse(source); this.ID = source["ID"]; this.CreatedAt = this.convertValues(source["CreatedAt"], null); this.UpdatedAt = this.convertValues(source["UpdatedAt"], null); this.DeletedAt = this.convertValues(source["DeletedAt"], null); this.ContactID = source["ContactID"]; this.Key = source["Key"]; this.Value = this.convertValues(source["Value"], 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 StreetAddress { ID: number; // Go type: time CreatedAt: any; // Go type: time UpdatedAt: any; // Go type: gorm DeletedAt: any; ContactID: number; Key: string; Street1: string; Street2: string; City: string; State: string; ZipCode: string; Country: string; static createFrom(source: any = {}) { return new StreetAddress(source); } constructor(source: any = {}) { if ('string' === typeof source) source = JSON.parse(source); this.ID = source["ID"]; this.CreatedAt = this.convertValues(source["CreatedAt"], null); this.UpdatedAt = this.convertValues(source["UpdatedAt"], null); this.DeletedAt = this.convertValues(source["DeletedAt"], null); this.ContactID = source["ContactID"]; this.Key = source["Key"]; this.Street1 = source["Street1"]; this.Street2 = source["Street2"]; this.City = source["City"]; this.State = source["State"]; this.ZipCode = source["ZipCode"]; this.Country = source["Country"]; } 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 URL { ID: number; // Go type: time CreatedAt: any; // Go type: time UpdatedAt: any; // Go type: gorm DeletedAt: any; ContactID: number; Key: string; Value: string; static createFrom(source: any = {}) { return new URL(source); } constructor(source: any = {}) { if ('string' === typeof source) source = JSON.parse(source); this.ID = source["ID"]; this.CreatedAt = this.convertValues(source["CreatedAt"], null); this.UpdatedAt = this.convertValues(source["UpdatedAt"], null); this.DeletedAt = this.convertValues(source["DeletedAt"], null); this.ContactID = source["ContactID"]; this.Key = source["Key"]; this.Value = source["Value"]; } 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 PhoneNumber { ID: number; // Go type: time CreatedAt: any; // Go type: time UpdatedAt: any; // Go type: gorm DeletedAt: any; ContactID: number; Key: string; Value: string; static createFrom(source: any = {}) { return new PhoneNumber(source); } constructor(source: any = {}) { if ('string' === typeof source) source = JSON.parse(source); this.ID = source["ID"]; this.CreatedAt = this.convertValues(source["CreatedAt"], null); this.UpdatedAt = this.convertValues(source["UpdatedAt"], null); this.DeletedAt = this.convertValues(source["DeletedAt"], null); this.ContactID = source["ContactID"]; this.Key = source["Key"]; this.Value = source["Value"]; } 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 EmailAddress { ID: number; // Go type: time CreatedAt: any; // Go type: time UpdatedAt: any; // Go type: gorm DeletedAt: any; ContactID: number; Key: string; Value: string; static createFrom(source: any = {}) { return new EmailAddress(source); } constructor(source: any = {}) { if ('string' === typeof source) source = JSON.parse(source); this.ID = source["ID"]; this.CreatedAt = this.convertValues(source["CreatedAt"], null); this.UpdatedAt = this.convertValues(source["UpdatedAt"], null); this.DeletedAt = this.convertValues(source["DeletedAt"], null); this.ContactID = source["ContactID"]; this.Key = source["Key"]; this.Value = source["Value"]; } 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 Contact { ID: number; // Go type: time CreatedAt: any; // Go type: time UpdatedAt: any; // Go type: gorm DeletedAt: any; Firstname: string; Lastname: string; Association: string; Job: string; Emails: EmailAddress[]; PhoneNumbers: PhoneNumber[]; Urls: URL[]; StreetAddresses: StreetAddress[]; Dates: Date[]; Other: OtherField[]; Notes: string; static createFrom(source: any = {}) { return new Contact(source); } constructor(source: any = {}) { if ('string' === typeof source) source = JSON.parse(source); this.ID = source["ID"]; this.CreatedAt = this.convertValues(source["CreatedAt"], null); this.UpdatedAt = this.convertValues(source["UpdatedAt"], null); this.DeletedAt = this.convertValues(source["DeletedAt"], null); this.Firstname = source["Firstname"]; this.Lastname = source["Lastname"]; this.Association = source["Association"]; this.Job = source["Job"]; this.Emails = this.convertValues(source["Emails"], EmailAddress); this.PhoneNumbers = this.convertValues(source["PhoneNumbers"], PhoneNumber); this.Urls = this.convertValues(source["Urls"], URL); this.StreetAddresses = this.convertValues(source["StreetAddresses"], StreetAddress); this.Dates = this.convertValues(source["Dates"], Date); this.Other = this.convertValues(source["Other"], OtherField); this.Notes = source["Notes"]; } 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 MailAccountConnection { ID: number; // Go type: time CreatedAt: any; // Go type: time UpdatedAt: any; // Go type: gorm DeletedAt: any; Email: string; ImapServer: string; ImapPort: number; ImapUsername: string; SmtpServer: string; SmtpPort: number; SmtpUsername: string; Password: string; // Go type: imapclient ImapClient?: any; SmtpClient?: smtp.Client; SmtpSasl?: any; static createFrom(source: any = {}) { return new MailAccountConnection(source); } constructor(source: any = {}) { if ('string' === typeof source) source = JSON.parse(source); this.ID = source["ID"]; this.CreatedAt = this.convertValues(source["CreatedAt"], null); this.UpdatedAt = this.convertValues(source["UpdatedAt"], null); this.DeletedAt = this.convertValues(source["DeletedAt"], null); this.Email = source["Email"]; this.ImapServer = source["ImapServer"]; this.ImapPort = source["ImapPort"]; this.ImapUsername = source["ImapUsername"]; this.SmtpServer = source["SmtpServer"]; this.SmtpPort = source["SmtpPort"]; this.SmtpUsername = source["SmtpUsername"]; this.Password = source["Password"]; this.ImapClient = this.convertValues(source["ImapClient"], null); this.SmtpClient = this.convertValues(source["SmtpClient"], smtp.Client); this.SmtpSasl = source["SmtpSasl"]; } 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 smtp { export class Client { CommandTimeout: number; SubmissionTimeout: number; DebugWriter: any; static createFrom(source: any = {}) { return new Client(source); } constructor(source: any = {}) { if ('string' === typeof source) source = JSON.parse(source); this.CommandTimeout = source["CommandTimeout"]; this.SubmissionTimeout = source["SubmissionTimeout"]; this.DebugWriter = source["DebugWriter"]; } } }