ZhimaMerchantBorrowEntityUploadModel.py 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class ZhimaMerchantBorrowEntityUploadModel(object):
  6. def __init__(self):
  7. self._address_desc = None
  8. self._can_borrow = None
  9. self._can_borrow_cnt = None
  10. self._category_code = None
  11. self._collect_rent = None
  12. self._contact_number = None
  13. self._entity_code = None
  14. self._entity_name = None
  15. self._latitude = None
  16. self._longitude = None
  17. self._office_hours_desc = None
  18. self._product_code = None
  19. self._rent_desc = None
  20. self._total_borrow_cnt = None
  21. self._upload_time = None
  22. @property
  23. def address_desc(self):
  24. return self._address_desc
  25. @address_desc.setter
  26. def address_desc(self, value):
  27. self._address_desc = value
  28. @property
  29. def can_borrow(self):
  30. return self._can_borrow
  31. @can_borrow.setter
  32. def can_borrow(self, value):
  33. self._can_borrow = value
  34. @property
  35. def can_borrow_cnt(self):
  36. return self._can_borrow_cnt
  37. @can_borrow_cnt.setter
  38. def can_borrow_cnt(self, value):
  39. self._can_borrow_cnt = value
  40. @property
  41. def category_code(self):
  42. return self._category_code
  43. @category_code.setter
  44. def category_code(self, value):
  45. self._category_code = value
  46. @property
  47. def collect_rent(self):
  48. return self._collect_rent
  49. @collect_rent.setter
  50. def collect_rent(self, value):
  51. self._collect_rent = value
  52. @property
  53. def contact_number(self):
  54. return self._contact_number
  55. @contact_number.setter
  56. def contact_number(self, value):
  57. self._contact_number = value
  58. @property
  59. def entity_code(self):
  60. return self._entity_code
  61. @entity_code.setter
  62. def entity_code(self, value):
  63. self._entity_code = value
  64. @property
  65. def entity_name(self):
  66. return self._entity_name
  67. @entity_name.setter
  68. def entity_name(self, value):
  69. self._entity_name = value
  70. @property
  71. def latitude(self):
  72. return self._latitude
  73. @latitude.setter
  74. def latitude(self, value):
  75. self._latitude = value
  76. @property
  77. def longitude(self):
  78. return self._longitude
  79. @longitude.setter
  80. def longitude(self, value):
  81. self._longitude = value
  82. @property
  83. def office_hours_desc(self):
  84. return self._office_hours_desc
  85. @office_hours_desc.setter
  86. def office_hours_desc(self, value):
  87. self._office_hours_desc = value
  88. @property
  89. def product_code(self):
  90. return self._product_code
  91. @product_code.setter
  92. def product_code(self, value):
  93. self._product_code = value
  94. @property
  95. def rent_desc(self):
  96. return self._rent_desc
  97. @rent_desc.setter
  98. def rent_desc(self, value):
  99. self._rent_desc = value
  100. @property
  101. def total_borrow_cnt(self):
  102. return self._total_borrow_cnt
  103. @total_borrow_cnt.setter
  104. def total_borrow_cnt(self, value):
  105. self._total_borrow_cnt = value
  106. @property
  107. def upload_time(self):
  108. return self._upload_time
  109. @upload_time.setter
  110. def upload_time(self, value):
  111. self._upload_time = value
  112. def to_alipay_dict(self):
  113. params = dict()
  114. if self.address_desc:
  115. if hasattr(self.address_desc, 'to_alipay_dict'):
  116. params['address_desc'] = self.address_desc.to_alipay_dict()
  117. else:
  118. params['address_desc'] = self.address_desc
  119. if self.can_borrow:
  120. if hasattr(self.can_borrow, 'to_alipay_dict'):
  121. params['can_borrow'] = self.can_borrow.to_alipay_dict()
  122. else:
  123. params['can_borrow'] = self.can_borrow
  124. if self.can_borrow_cnt:
  125. if hasattr(self.can_borrow_cnt, 'to_alipay_dict'):
  126. params['can_borrow_cnt'] = self.can_borrow_cnt.to_alipay_dict()
  127. else:
  128. params['can_borrow_cnt'] = self.can_borrow_cnt
  129. if self.category_code:
  130. if hasattr(self.category_code, 'to_alipay_dict'):
  131. params['category_code'] = self.category_code.to_alipay_dict()
  132. else:
  133. params['category_code'] = self.category_code
  134. if self.collect_rent:
  135. if hasattr(self.collect_rent, 'to_alipay_dict'):
  136. params['collect_rent'] = self.collect_rent.to_alipay_dict()
  137. else:
  138. params['collect_rent'] = self.collect_rent
  139. if self.contact_number:
  140. if hasattr(self.contact_number, 'to_alipay_dict'):
  141. params['contact_number'] = self.contact_number.to_alipay_dict()
  142. else:
  143. params['contact_number'] = self.contact_number
  144. if self.entity_code:
  145. if hasattr(self.entity_code, 'to_alipay_dict'):
  146. params['entity_code'] = self.entity_code.to_alipay_dict()
  147. else:
  148. params['entity_code'] = self.entity_code
  149. if self.entity_name:
  150. if hasattr(self.entity_name, 'to_alipay_dict'):
  151. params['entity_name'] = self.entity_name.to_alipay_dict()
  152. else:
  153. params['entity_name'] = self.entity_name
  154. if self.latitude:
  155. if hasattr(self.latitude, 'to_alipay_dict'):
  156. params['latitude'] = self.latitude.to_alipay_dict()
  157. else:
  158. params['latitude'] = self.latitude
  159. if self.longitude:
  160. if hasattr(self.longitude, 'to_alipay_dict'):
  161. params['longitude'] = self.longitude.to_alipay_dict()
  162. else:
  163. params['longitude'] = self.longitude
  164. if self.office_hours_desc:
  165. if hasattr(self.office_hours_desc, 'to_alipay_dict'):
  166. params['office_hours_desc'] = self.office_hours_desc.to_alipay_dict()
  167. else:
  168. params['office_hours_desc'] = self.office_hours_desc
  169. if self.product_code:
  170. if hasattr(self.product_code, 'to_alipay_dict'):
  171. params['product_code'] = self.product_code.to_alipay_dict()
  172. else:
  173. params['product_code'] = self.product_code
  174. if self.rent_desc:
  175. if hasattr(self.rent_desc, 'to_alipay_dict'):
  176. params['rent_desc'] = self.rent_desc.to_alipay_dict()
  177. else:
  178. params['rent_desc'] = self.rent_desc
  179. if self.total_borrow_cnt:
  180. if hasattr(self.total_borrow_cnt, 'to_alipay_dict'):
  181. params['total_borrow_cnt'] = self.total_borrow_cnt.to_alipay_dict()
  182. else:
  183. params['total_borrow_cnt'] = self.total_borrow_cnt
  184. if self.upload_time:
  185. if hasattr(self.upload_time, 'to_alipay_dict'):
  186. params['upload_time'] = self.upload_time.to_alipay_dict()
  187. else:
  188. params['upload_time'] = self.upload_time
  189. return params
  190. @staticmethod
  191. def from_alipay_dict(d):
  192. if not d:
  193. return None
  194. o = ZhimaMerchantBorrowEntityUploadModel()
  195. if 'address_desc' in d:
  196. o.address_desc = d['address_desc']
  197. if 'can_borrow' in d:
  198. o.can_borrow = d['can_borrow']
  199. if 'can_borrow_cnt' in d:
  200. o.can_borrow_cnt = d['can_borrow_cnt']
  201. if 'category_code' in d:
  202. o.category_code = d['category_code']
  203. if 'collect_rent' in d:
  204. o.collect_rent = d['collect_rent']
  205. if 'contact_number' in d:
  206. o.contact_number = d['contact_number']
  207. if 'entity_code' in d:
  208. o.entity_code = d['entity_code']
  209. if 'entity_name' in d:
  210. o.entity_name = d['entity_name']
  211. if 'latitude' in d:
  212. o.latitude = d['latitude']
  213. if 'longitude' in d:
  214. o.longitude = d['longitude']
  215. if 'office_hours_desc' in d:
  216. o.office_hours_desc = d['office_hours_desc']
  217. if 'product_code' in d:
  218. o.product_code = d['product_code']
  219. if 'rent_desc' in d:
  220. o.rent_desc = d['rent_desc']
  221. if 'total_borrow_cnt' in d:
  222. o.total_borrow_cnt = d['total_borrow_cnt']
  223. if 'upload_time' in d:
  224. o.upload_time = d['upload_time']
  225. return o