123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205 |
- #!/usr/bin/env python
- # -*- coding: utf-8 -*-
- import json
- from alipay.aop.api.constant.ParamConstants import *
- class RecItemInfo(object):
- def __init__(self):
- self._area_code = None
- self._biz_type = None
- self._description = None
- self._ext_info = None
- self._icon = None
- self._item_code = None
- self._item_id = None
- self._name = None
- self._service_code = None
- self._status = None
- self._type = None
- self._url = None
- @property
- def area_code(self):
- return self._area_code
- @area_code.setter
- def area_code(self, value):
- self._area_code = value
- @property
- def biz_type(self):
- return self._biz_type
- @biz_type.setter
- def biz_type(self, value):
- self._biz_type = value
- @property
- def description(self):
- return self._description
- @description.setter
- def description(self, value):
- self._description = value
- @property
- def ext_info(self):
- return self._ext_info
- @ext_info.setter
- def ext_info(self, value):
- self._ext_info = value
- @property
- def icon(self):
- return self._icon
- @icon.setter
- def icon(self, value):
- self._icon = value
- @property
- def item_code(self):
- return self._item_code
- @item_code.setter
- def item_code(self, value):
- self._item_code = value
- @property
- def item_id(self):
- return self._item_id
- @item_id.setter
- def item_id(self, value):
- self._item_id = value
- @property
- def name(self):
- return self._name
- @name.setter
- def name(self, value):
- self._name = value
- @property
- def service_code(self):
- return self._service_code
- @service_code.setter
- def service_code(self, value):
- self._service_code = value
- @property
- def status(self):
- return self._status
- @status.setter
- def status(self, value):
- self._status = value
- @property
- def type(self):
- return self._type
- @type.setter
- def type(self, value):
- self._type = 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.area_code:
- if hasattr(self.area_code, 'to_alipay_dict'):
- params['area_code'] = self.area_code.to_alipay_dict()
- else:
- params['area_code'] = self.area_code
- if self.biz_type:
- if hasattr(self.biz_type, 'to_alipay_dict'):
- params['biz_type'] = self.biz_type.to_alipay_dict()
- else:
- params['biz_type'] = self.biz_type
- if self.description:
- if hasattr(self.description, 'to_alipay_dict'):
- params['description'] = self.description.to_alipay_dict()
- else:
- params['description'] = self.description
- if self.ext_info:
- if hasattr(self.ext_info, 'to_alipay_dict'):
- params['ext_info'] = self.ext_info.to_alipay_dict()
- else:
- params['ext_info'] = self.ext_info
- if self.icon:
- if hasattr(self.icon, 'to_alipay_dict'):
- params['icon'] = self.icon.to_alipay_dict()
- else:
- params['icon'] = self.icon
- if self.item_code:
- if hasattr(self.item_code, 'to_alipay_dict'):
- params['item_code'] = self.item_code.to_alipay_dict()
- else:
- params['item_code'] = self.item_code
- if self.item_id:
- if hasattr(self.item_id, 'to_alipay_dict'):
- params['item_id'] = self.item_id.to_alipay_dict()
- else:
- params['item_id'] = self.item_id
- if self.name:
- if hasattr(self.name, 'to_alipay_dict'):
- params['name'] = self.name.to_alipay_dict()
- else:
- params['name'] = self.name
- if self.service_code:
- if hasattr(self.service_code, 'to_alipay_dict'):
- params['service_code'] = self.service_code.to_alipay_dict()
- else:
- params['service_code'] = self.service_code
- if self.status:
- if hasattr(self.status, 'to_alipay_dict'):
- params['status'] = self.status.to_alipay_dict()
- else:
- params['status'] = self.status
- if self.type:
- if hasattr(self.type, 'to_alipay_dict'):
- params['type'] = self.type.to_alipay_dict()
- else:
- params['type'] = self.type
- 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 = RecItemInfo()
- if 'area_code' in d:
- o.area_code = d['area_code']
- if 'biz_type' in d:
- o.biz_type = d['biz_type']
- if 'description' in d:
- o.description = d['description']
- if 'ext_info' in d:
- o.ext_info = d['ext_info']
- if 'icon' in d:
- o.icon = d['icon']
- if 'item_code' in d:
- o.item_code = d['item_code']
- if 'item_id' in d:
- o.item_id = d['item_id']
- if 'name' in d:
- o.name = d['name']
- if 'service_code' in d:
- o.service_code = d['service_code']
- if 'status' in d:
- o.status = d['status']
- if 'type' in d:
- o.type = d['type']
- if 'url' in d:
- o.url = d['url']
- return o
|