public EmailIngestionProfile(JToken node) : base(node) { if (node["id"] != null) { this._Id = ParseInt(node["id"].Value <string>()); } if (node["name"] != null) { this._Name = node["name"].Value <string>(); } if (node["description"] != null) { this._Description = node["description"].Value <string>(); } if (node["emailAddress"] != null) { this._EmailAddress = node["emailAddress"].Value <string>(); } if (node["mailboxId"] != null) { this._MailboxId = node["mailboxId"].Value <string>(); } if (node["partnerId"] != null) { this._PartnerId = ParseInt(node["partnerId"].Value <string>()); } if (node["conversionProfile2Id"] != null) { this._ConversionProfile2Id = ParseInt(node["conversionProfile2Id"].Value <string>()); } if (node["moderationStatus"] != null) { this._ModerationStatus = (EntryModerationStatus)ParseEnum(typeof(EntryModerationStatus), node["moderationStatus"].Value <string>()); } if (node["status"] != null) { this._Status = (EmailIngestionProfileStatus)ParseEnum(typeof(EmailIngestionProfileStatus), node["status"].Value <string>()); } if (node["createdAt"] != null) { this._CreatedAt = node["createdAt"].Value <string>(); } if (node["defaultCategory"] != null) { this._DefaultCategory = node["defaultCategory"].Value <string>(); } if (node["defaultUserId"] != null) { this._DefaultUserId = node["defaultUserId"].Value <string>(); } if (node["defaultTags"] != null) { this._DefaultTags = node["defaultTags"].Value <string>(); } if (node["defaultAdminTags"] != null) { this._DefaultAdminTags = node["defaultAdminTags"].Value <string>(); } if (node["maxAttachmentSizeKbytes"] != null) { this._MaxAttachmentSizeKbytes = ParseInt(node["maxAttachmentSizeKbytes"].Value <string>()); } if (node["maxAttachmentsPerMail"] != null) { this._MaxAttachmentsPerMail = ParseInt(node["maxAttachmentsPerMail"].Value <string>()); } }
public EmailIngestionProfile(XmlElement node) : base(node) { foreach (XmlElement propertyNode in node.ChildNodes) { switch (propertyNode.Name) { case "id": this._Id = ParseInt(propertyNode.InnerText); continue; case "name": this._Name = propertyNode.InnerText; continue; case "description": this._Description = propertyNode.InnerText; continue; case "emailAddress": this._EmailAddress = propertyNode.InnerText; continue; case "mailboxId": this._MailboxId = propertyNode.InnerText; continue; case "partnerId": this._PartnerId = ParseInt(propertyNode.InnerText); continue; case "conversionProfile2Id": this._ConversionProfile2Id = ParseInt(propertyNode.InnerText); continue; case "moderationStatus": this._ModerationStatus = (EntryModerationStatus)ParseEnum(typeof(EntryModerationStatus), propertyNode.InnerText); continue; case "status": this._Status = (EmailIngestionProfileStatus)ParseEnum(typeof(EmailIngestionProfileStatus), propertyNode.InnerText); continue; case "createdAt": this._CreatedAt = propertyNode.InnerText; continue; case "defaultCategory": this._DefaultCategory = propertyNode.InnerText; continue; case "defaultUserId": this._DefaultUserId = propertyNode.InnerText; continue; case "defaultTags": this._DefaultTags = propertyNode.InnerText; continue; case "defaultAdminTags": this._DefaultAdminTags = propertyNode.InnerText; continue; case "maxAttachmentSizeKbytes": this._MaxAttachmentSizeKbytes = ParseInt(propertyNode.InnerText); continue; case "maxAttachmentsPerMail": this._MaxAttachmentsPerMail = ParseInt(propertyNode.InnerText); continue; } } }