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 DisplayImage { ID: number; // Go type: time CreatedAt: any; // Go type: time UpdatedAt: any; // Go type: gorm DeletedAt: any; MIMEType: string; Content: number[]; static createFrom(source: any = {}) { return new DisplayImage(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.MIMEType = source["MIMEType"]; this.Content = source["Content"]; } 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; DisplayImageID: number; DisplayImage: DisplayImage; 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.DisplayImageID = source["DisplayImageID"]; this.DisplayImage = this.convertValues(source["DisplayImage"], DisplayImage); 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 MessageContent { ID: number; // Go type: time CreatedAt: any; // Go type: time UpdatedAt: any; // Go type: gorm DeletedAt: any; MessageID: number; MIMEType: string; Content: number[]; static createFrom(source: any = {}) { return new MessageContent(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.MessageID = source["MessageID"]; this.MIMEType = source["MIMEType"]; this.Content = source["Content"]; } 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 MailHeader { ID: number; // Go type: time CreatedAt: any; // Go type: time UpdatedAt: any; // Go type: gorm DeletedAt: any; MessageID: number; Key: string; Value: string; static createFrom(source: any = {}) { return new MailHeader(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.MessageID = source["MessageID"]; 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 Message { ID: number; // Go type: time CreatedAt: any; // Go type: time UpdatedAt: any; // Go type: gorm DeletedAt: any; From: string; To: string; Subject: string; // Go type: time Date: any; ServerMessageID: string; UID: number; Seen: boolean; Answered: boolean; Deleted: boolean; EmailID: string; ThreadID: string; ConversationID: number; Conversation: Conversation; SenderID: number; Sender: EmailAddress; Hidden: boolean; Internal: boolean; Headers: MailHeader[]; MessageContents: MessageContent[]; static createFrom(source: any = {}) { return new Message(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.From = source["From"]; this.To = source["To"]; this.Subject = source["Subject"]; this.Date = this.convertValues(source["Date"], null); this.ServerMessageID = source["ServerMessageID"]; this.UID = source["UID"]; this.Seen = source["Seen"]; this.Answered = source["Answered"]; this.Deleted = source["Deleted"]; this.EmailID = source["EmailID"]; this.ThreadID = source["ThreadID"]; this.ConversationID = source["ConversationID"]; this.Conversation = this.convertValues(source["Conversation"], Conversation); this.SenderID = source["SenderID"]; this.Sender = this.convertValues(source["Sender"], EmailAddress); this.Hidden = source["Hidden"]; this.Internal = source["Internal"]; this.Headers = this.convertValues(source["Headers"], MailHeader); this.MessageContents = this.convertValues(source["MessageContents"], MessageContent); } 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 Conversation { ID: number; // Go type: time CreatedAt: any; // Go type: time UpdatedAt: any; // Go type: gorm DeletedAt: any; Subject: string; IsUnread: boolean; ServerRecipientID: number; ServerRecipient: EmailAddress; DisplayImageID: number; DisplayImage: DisplayImage; Recipients: EmailAddress[]; Messages: Message[]; static createFrom(source: any = {}) { return new Conversation(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.Subject = source["Subject"]; this.IsUnread = source["IsUnread"]; this.ServerRecipientID = source["ServerRecipientID"]; this.ServerRecipient = this.convertValues(source["ServerRecipient"], EmailAddress); this.DisplayImageID = source["DisplayImageID"]; this.DisplayImage = this.convertValues(source["DisplayImage"], DisplayImage); this.Recipients = this.convertValues(source["Recipients"], EmailAddress); this.Messages = this.convertValues(source["Messages"], Message); } 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 ImageResponse { DataURI: string; Base64: string; static createFrom(source: any = {}) { return new ImageResponse(source); } constructor(source: any = {}) { if ('string' === typeof source) source = JSON.parse(source); this.DataURI = source["DataURI"]; this.Base64 = source["Base64"]; } } export class LogMessage { static createFrom(source: any = {}) { return new LogMessage(source); } constructor(source: any = {}) { if ('string' === typeof source) source = JSON.parse(source); } } 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 class PaginatedMessages { messages: Message[]; total: number; static createFrom(source: any = {}) { return new PaginatedMessages(source); } constructor(source: any = {}) { if ('string' === typeof source) source = JSON.parse(source); this.messages = this.convertValues(source["messages"], Message); this.total = source["total"]; } 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"]; } } }