123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160 |
- #!/usr/bin/env python
- # -*- coding: utf-8 -*-
- import json
- from alipay.aop.api.constant.ParamConstants import *
- class MiniActivityModuleQueryInfo(object):
- def __init__(self):
- self._action_text = None
- self._id = None
- self._image = None
- self._logo = None
- self._mini_app_id = None
- self._page = None
- self._sub_title = None
- self._title = None
- self._url = None
- @property
- def action_text(self):
- return self._action_text
- @action_text.setter
- def action_text(self, value):
- self._action_text = value
- @property
- def id(self):
- return self._id
- @id.setter
- def id(self, value):
- self._id = value
- @property
- def image(self):
- return self._image
- @image.setter
- def image(self, value):
- self._image = value
- @property
- def logo(self):
- return self._logo
- @logo.setter
- def logo(self, value):
- self._logo = value
- @property
- def mini_app_id(self):
- return self._mini_app_id
- @mini_app_id.setter
- def mini_app_id(self, value):
- self._mini_app_id = value
- @property
- def page(self):
- return self._page
- @page.setter
- def page(self, value):
- self._page = value
- @property
- def sub_title(self):
- return self._sub_title
- @sub_title.setter
- def sub_title(self, value):
- self._sub_title = value
- @property
- def title(self):
- return self._title
- @title.setter
- def title(self, value):
- self._title = value
- @property
- def url(self):
- return self._url
- @url.setter
- def url(self, value):
- self._url = value
- def to_alipay_dict(self):
- params = dict()
- if self.action_text:
- if hasattr(self.action_text, 'to_alipay_dict'):
- params['action_text'] = self.action_text.to_alipay_dict()
- else:
- params['action_text'] = self.action_text
- if self.id:
- if hasattr(self.id, 'to_alipay_dict'):
- params['id'] = self.id.to_alipay_dict()
- else:
- params['id'] = self.id
- if self.image:
- if hasattr(self.image, 'to_alipay_dict'):
- params['image'] = self.image.to_alipay_dict()
- else:
- params['image'] = self.image
- if self.logo:
- if hasattr(self.logo, 'to_alipay_dict'):
- params['logo'] = self.logo.to_alipay_dict()
- else:
- params['logo'] = self.logo
- if self.mini_app_id:
- if hasattr(self.mini_app_id, 'to_alipay_dict'):
- params['mini_app_id'] = self.mini_app_id.to_alipay_dict()
- else:
- params['mini_app_id'] = self.mini_app_id
- if self.page:
- if hasattr(self.page, 'to_alipay_dict'):
- params['page'] = self.page.to_alipay_dict()
- else:
- params['page'] = self.page
- if self.sub_title:
- if hasattr(self.sub_title, 'to_alipay_dict'):
- params['sub_title'] = self.sub_title.to_alipay_dict()
- else:
- params['sub_title'] = self.sub_title
- if self.title:
- if hasattr(self.title, 'to_alipay_dict'):
- params['title'] = self.title.to_alipay_dict()
- else:
- params['title'] = self.title
- if self.url:
- if hasattr(self.url, 'to_alipay_dict'):
- params['url'] = self.url.to_alipay_dict()
- else:
- params['url'] = self.url
- return params
- @staticmethod
- def from_alipay_dict(d):
- if not d:
- return None
- o = MiniActivityModuleQueryInfo()
- if 'action_text' in d:
- o.action_text = d['action_text']
- if 'id' in d:
- o.id = d['id']
- if 'image' in d:
- o.image = d['image']
- if 'logo' in d:
- o.logo = d['logo']
- if 'mini_app_id' in d:
- o.mini_app_id = d['mini_app_id']
- if 'page' in d:
- o.page = d['page']
- if 'sub_title' in d:
- o.sub_title = d['sub_title']
- if 'title' in d:
- o.title = d['title']
- if 'url' in d:
- o.url = d['url']
- return o
|