123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- #!/usr/bin/env python
- # -*- coding: utf-8 -*-
- import json
- from alipay.aop.api.constant.ParamConstants import *
- class AlipayOpenMiniVersionUploadModel(object):
- def __init__(self):
- self._app_version = None
- self._bundle_id = None
- self._ext = None
- self._template_id = None
- self._template_version = None
- @property
- def app_version(self):
- return self._app_version
- @app_version.setter
- def app_version(self, value):
- self._app_version = value
- @property
- def bundle_id(self):
- return self._bundle_id
- @bundle_id.setter
- def bundle_id(self, value):
- self._bundle_id = value
- @property
- def ext(self):
- return self._ext
- @ext.setter
- def ext(self, value):
- self._ext = value
- @property
- def template_id(self):
- return self._template_id
- @template_id.setter
- def template_id(self, value):
- self._template_id = value
- @property
- def template_version(self):
- return self._template_version
- @template_version.setter
- def template_version(self, value):
- self._template_version = value
- def to_alipay_dict(self):
- params = dict()
- if self.app_version:
- if hasattr(self.app_version, 'to_alipay_dict'):
- params['app_version'] = self.app_version.to_alipay_dict()
- else:
- params['app_version'] = self.app_version
- if self.bundle_id:
- if hasattr(self.bundle_id, 'to_alipay_dict'):
- params['bundle_id'] = self.bundle_id.to_alipay_dict()
- else:
- params['bundle_id'] = self.bundle_id
- if self.ext:
- if hasattr(self.ext, 'to_alipay_dict'):
- params['ext'] = self.ext.to_alipay_dict()
- else:
- params['ext'] = self.ext
- if self.template_id:
- if hasattr(self.template_id, 'to_alipay_dict'):
- params['template_id'] = self.template_id.to_alipay_dict()
- else:
- params['template_id'] = self.template_id
- if self.template_version:
- if hasattr(self.template_version, 'to_alipay_dict'):
- params['template_version'] = self.template_version.to_alipay_dict()
- else:
- params['template_version'] = self.template_version
- return params
- @staticmethod
- def from_alipay_dict(d):
- if not d:
- return None
- o = AlipayOpenMiniVersionUploadModel()
- if 'app_version' in d:
- o.app_version = d['app_version']
- if 'bundle_id' in d:
- o.bundle_id = d['bundle_id']
- if 'ext' in d:
- o.ext = d['ext']
- if 'template_id' in d:
- o.template_id = d['template_id']
- if 'template_version' in d:
- o.template_version = d['template_version']
- return o
|