Пример #1
0
    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
Пример #2
0
 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
Пример #3
0
 def parseInternal(self, value, instance):
     nameValue = value['name']
     instance.name = serder.STRING.parse(nameValue)
     quotaValue = value['quota']
     instance.quota = serder.INT.parse(quotaValue)
     from netbluemind.mailbox.api.MailboxRouting import MailboxRouting
     from netbluemind.mailbox.api.MailboxRouting import __MailboxRoutingSerDer__
     routingValue = value['routing']
     instance.routing = __MailboxRoutingSerDer__().parse(routingValue)
     from netbluemind.addressbook.api.VCard import VCard
     from netbluemind.addressbook.api.VCard import __VCardSerDer__
     cardValue = value['card']
     instance.card = __VCardSerDer__().parse(cardValue)
     dataLocationValue = value['dataLocation']
     instance.dataLocation = serder.STRING.parse(dataLocationValue)
     return instance
Пример #4
0
    def encodeInternal(self, value, instance):
        __DirBaseValueSerDer__().encodeInternal(value, instance)

        nameValue = value.name
        instance["name"] = serder.STRING.encode(nameValue)
        quotaValue = value.quota
        instance["quota"] = serder.INT.encode(quotaValue)
        from netbluemind.mailbox.api.MailboxRouting import MailboxRouting
        from netbluemind.mailbox.api.MailboxRouting import __MailboxRoutingSerDer__
        routingValue = value.routing
        instance["routing"] = __MailboxRoutingSerDer__().encode(routingValue)
        from netbluemind.addressbook.api.VCard import VCard
        from netbluemind.addressbook.api.VCard import __VCardSerDer__
        cardValue = value.card
        instance["card"] = __VCardSerDer__().encode(cardValue)
        dataLocationValue = value.dataLocation
        instance["dataLocation"] = serder.STRING.encode(dataLocationValue)
        return instance
Пример #5
0
 def parseInternal(self, value, instance):
     loginValue = value['login']
     instance.login = serder.STRING.parse(loginValue)
     passwordValue = value['password']
     instance.password = serder.STRING.parse(passwordValue)
     from netbluemind.addressbook.api.VCard import VCard
     from netbluemind.addressbook.api.VCard import __VCardSerDer__
     contactInfosValue = value['contactInfos']
     instance.contactInfos = __VCardSerDer__().parse(contactInfosValue)
     from netbluemind.mailbox.api.MailboxRouting import MailboxRouting
     from netbluemind.mailbox.api.MailboxRouting import __MailboxRoutingSerDer__
     routingValue = value['routing']
     instance.routing = __MailboxRoutingSerDer__().parse(routingValue)
     dataLocationValue = value['dataLocation']
     instance.dataLocation = serder.STRING.parse(dataLocationValue)
     quotaValue = value['quota']
     instance.quota = serder.INT.parse(quotaValue)
     propertiesValue = value['properties']
     instance.properties = serder.MapSerDer(
         serder.STRING).parse(propertiesValue)
     return instance
Пример #6
0
    def encodeInternal(self, value, instance):
        __DirBaseValueSerDer__().encodeInternal(value, instance)

        loginValue = value.login
        instance["login"] = serder.STRING.encode(loginValue)
        passwordValue = value.password
        instance["password"] = serder.STRING.encode(passwordValue)
        from netbluemind.addressbook.api.VCard import VCard
        from netbluemind.addressbook.api.VCard import __VCardSerDer__
        contactInfosValue = value.contactInfos
        instance["contactInfos"] = __VCardSerDer__().encode(contactInfosValue)
        from netbluemind.mailbox.api.MailboxRouting import MailboxRouting
        from netbluemind.mailbox.api.MailboxRouting import __MailboxRoutingSerDer__
        routingValue = value.routing
        instance["routing"] = __MailboxRoutingSerDer__().encode(routingValue)
        dataLocationValue = value.dataLocation
        instance["dataLocation"] = serder.STRING.encode(dataLocationValue)
        quotaValue = value.quota
        instance["quota"] = serder.INT.encode(quotaValue)
        propertiesValue = value.properties
        instance["properties"] = serder.MapSerDer(
            serder.STRING).encode(propertiesValue)
        return instance