def encodeInternal(self, value, instance): from netbluemind.directory.api.DirEntryKind import DirEntryKind from netbluemind.directory.api.DirEntryKind import __DirEntryKindSerDer__ kindValue = value.kind instance["kind"] = __DirEntryKindSerDer__().encode(kindValue) pathValue = value.path instance["path"] = serder.STRING.encode(pathValue) displayNameValue = value.displayName instance["displayName"] = serder.STRING.encode(displayNameValue) entryUidValue = value.entryUid instance["entryUid"] = serder.STRING.encode(entryUidValue) emailValue = value.email instance["email"] = serder.STRING.encode(emailValue) hiddenValue = value.hidden instance["hidden"] = serder.BOOLEAN.encode(hiddenValue) systemValue = value.system instance["system"] = serder.BOOLEAN.encode(systemValue) archivedValue = value.archived instance["archived"] = serder.BOOLEAN.encode(archivedValue) from netbluemind.core.api.Email import Email from netbluemind.core.api.Email import __EmailSerDer__ emailsValue = value.emails instance["emails"] = serder.ListSerDer( __EmailSerDer__()).encode(emailsValue) orgUnitUidValue = value.orgUnitUid instance["orgUnitUid"] = serder.STRING.encode(orgUnitUidValue) from netbluemind.directory.api.OrgUnitPath import OrgUnitPath from netbluemind.directory.api.OrgUnitPath import __OrgUnitPathSerDer__ orgUnitPathValue = value.orgUnitPath instance["orgUnitPath"] = __OrgUnitPathSerDer__().encode( orgUnitPathValue) return instance
def parseInternal(self, value, instance): from netbluemind.directory.api.DirEntryKind import DirEntryKind from netbluemind.directory.api.DirEntryKind import __DirEntryKindSerDer__ kindValue = value['kind'] instance.kind = __DirEntryKindSerDer__().parse(kindValue) pathValue = value['path'] instance.path = serder.STRING.parse(pathValue) displayNameValue = value['displayName'] instance.displayName = serder.STRING.parse(displayNameValue) entryUidValue = value['entryUid'] instance.entryUid = serder.STRING.parse(entryUidValue) emailValue = value['email'] instance.email = serder.STRING.parse(emailValue) hiddenValue = value['hidden'] instance.hidden = serder.BOOLEAN.parse(hiddenValue) systemValue = value['system'] instance.system = serder.BOOLEAN.parse(systemValue) archivedValue = value['archived'] instance.archived = serder.BOOLEAN.parse(archivedValue) from netbluemind.core.api.Email import Email from netbluemind.core.api.Email import __EmailSerDer__ emailsValue = value['emails'] instance.emails = serder.ListSerDer( __EmailSerDer__()).parse(emailsValue) orgUnitUidValue = value['orgUnitUid'] instance.orgUnitUid = serder.STRING.parse(orgUnitUidValue) from netbluemind.directory.api.OrgUnitPath import OrgUnitPath from netbluemind.directory.api.OrgUnitPath import __OrgUnitPathSerDer__ orgUnitPathValue = value['orgUnitPath'] instance.orgUnitPath = __OrgUnitPathSerDer__().parse(orgUnitPathValue) return instance
def encodeInternal(self, value, instance): nameValue = value.name instance["name"] = serder.STRING.encode(nameValue) systemValue = value.system instance["system"] = serder.BOOLEAN.encode(systemValue) hiddenValue = value.hidden instance["hidden"] = serder.BOOLEAN.encode(hiddenValue) archivedValue = value.archived instance["archived"] = serder.BOOLEAN.encode(archivedValue) from netbluemind.mailbox.api.MailboxType import MailboxType from netbluemind.mailbox.api.MailboxType import __MailboxTypeSerDer__ typeValue = value.type instance["type"] = __MailboxTypeSerDer__().encode(typeValue) from netbluemind.mailbox.api.MailboxRouting import MailboxRouting from netbluemind.mailbox.api.MailboxRouting import __MailboxRoutingSerDer__ routingValue = value.routing instance["routing"] = __MailboxRoutingSerDer__().encode(routingValue) from netbluemind.core.api.Email import Email from netbluemind.core.api.Email import __EmailSerDer__ emailsValue = value.emails instance["emails"] = serder.CollectionSerDer( __EmailSerDer__()).encode(emailsValue) dataLocationValue = value.dataLocation instance["dataLocation"] = serder.STRING.encode(dataLocationValue) quotaValue = value.quota instance["quota"] = serder.INT.encode(quotaValue) return instance
def parseInternal(self, value, instance): nameValue = value['name'] instance.name = serder.STRING.parse(nameValue) systemValue = value['system'] instance.system = serder.BOOLEAN.parse(systemValue) hiddenValue = value['hidden'] instance.hidden = serder.BOOLEAN.parse(hiddenValue) archivedValue = value['archived'] instance.archived = serder.BOOLEAN.parse(archivedValue) from netbluemind.mailbox.api.MailboxType import MailboxType from netbluemind.mailbox.api.MailboxType import __MailboxTypeSerDer__ typeValue = value['type'] instance.type = __MailboxTypeSerDer__().parse(typeValue) from netbluemind.mailbox.api.MailboxRouting import MailboxRouting from netbluemind.mailbox.api.MailboxRouting import __MailboxRoutingSerDer__ routingValue = value['routing'] instance.routing = __MailboxRoutingSerDer__().parse(routingValue) from netbluemind.core.api.Email import Email from netbluemind.core.api.Email import __EmailSerDer__ emailsValue = value['emails'] instance.emails = serder.CollectionSerDer( __EmailSerDer__()).parse(emailsValue) dataLocationValue = value['dataLocation'] instance.dataLocation = serder.STRING.parse(dataLocationValue) quotaValue = value['quota'] instance.quota = serder.INT.parse(quotaValue) return instance
def parseInternal(self, value, instance): orgUnitUidValue = value['orgUnitUid'] instance.orgUnitUid = serder.STRING.parse(orgUnitUidValue) from netbluemind.core.api.Email import Email from netbluemind.core.api.Email import __EmailSerDer__ emailsValue = value['emails'] instance.emails = serder.CollectionSerDer( __EmailSerDer__()).parse(emailsValue) hiddenValue = value['hidden'] instance.hidden = serder.BOOLEAN.parse(hiddenValue) archivedValue = value['archived'] instance.archived = serder.BOOLEAN.parse(archivedValue) systemValue = value['system'] instance.system = serder.BOOLEAN.parse(systemValue) return instance
def encodeInternal(self, value, instance): orgUnitUidValue = value.orgUnitUid instance["orgUnitUid"] = serder.STRING.encode(orgUnitUidValue) from netbluemind.core.api.Email import Email from netbluemind.core.api.Email import __EmailSerDer__ emailsValue = value.emails instance["emails"] = serder.CollectionSerDer( __EmailSerDer__()).encode(emailsValue) hiddenValue = value.hidden instance["hidden"] = serder.BOOLEAN.encode(hiddenValue) archivedValue = value.archived instance["archived"] = serder.BOOLEAN.encode(archivedValue) systemValue = value.system instance["system"] = serder.BOOLEAN.encode(systemValue) return instance