AlipayEcoRenthouseCommunityBaseinfoSyncModel.py 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class AlipayEcoRenthouseCommunityBaseinfoSyncModel(object):
  6. def __init__(self):
  7. self._bus_code = None
  8. self._bus_lat = None
  9. self._bus_lng = None
  10. self._bus_name = None
  11. self._bus_radius = None
  12. self._city_code = None
  13. self._city_lat = None
  14. self._city_lng = None
  15. self._city_name = None
  16. self._community_code = None
  17. self._community_lat = None
  18. self._community_lng = None
  19. self._community_name = None
  20. self._community_nong = None
  21. self._community_street = None
  22. self._community_tag = None
  23. self._district_code = None
  24. self._district_lat = None
  25. self._district_lng = None
  26. self._district_name = None
  27. self._subway_stations = None
  28. @property
  29. def bus_code(self):
  30. return self._bus_code
  31. @bus_code.setter
  32. def bus_code(self, value):
  33. self._bus_code = value
  34. @property
  35. def bus_lat(self):
  36. return self._bus_lat
  37. @bus_lat.setter
  38. def bus_lat(self, value):
  39. self._bus_lat = value
  40. @property
  41. def bus_lng(self):
  42. return self._bus_lng
  43. @bus_lng.setter
  44. def bus_lng(self, value):
  45. self._bus_lng = value
  46. @property
  47. def bus_name(self):
  48. return self._bus_name
  49. @bus_name.setter
  50. def bus_name(self, value):
  51. self._bus_name = value
  52. @property
  53. def bus_radius(self):
  54. return self._bus_radius
  55. @bus_radius.setter
  56. def bus_radius(self, value):
  57. self._bus_radius = value
  58. @property
  59. def city_code(self):
  60. return self._city_code
  61. @city_code.setter
  62. def city_code(self, value):
  63. self._city_code = value
  64. @property
  65. def city_lat(self):
  66. return self._city_lat
  67. @city_lat.setter
  68. def city_lat(self, value):
  69. self._city_lat = value
  70. @property
  71. def city_lng(self):
  72. return self._city_lng
  73. @city_lng.setter
  74. def city_lng(self, value):
  75. self._city_lng = value
  76. @property
  77. def city_name(self):
  78. return self._city_name
  79. @city_name.setter
  80. def city_name(self, value):
  81. self._city_name = value
  82. @property
  83. def community_code(self):
  84. return self._community_code
  85. @community_code.setter
  86. def community_code(self, value):
  87. self._community_code = value
  88. @property
  89. def community_lat(self):
  90. return self._community_lat
  91. @community_lat.setter
  92. def community_lat(self, value):
  93. self._community_lat = value
  94. @property
  95. def community_lng(self):
  96. return self._community_lng
  97. @community_lng.setter
  98. def community_lng(self, value):
  99. self._community_lng = value
  100. @property
  101. def community_name(self):
  102. return self._community_name
  103. @community_name.setter
  104. def community_name(self, value):
  105. self._community_name = value
  106. @property
  107. def community_nong(self):
  108. return self._community_nong
  109. @community_nong.setter
  110. def community_nong(self, value):
  111. self._community_nong = value
  112. @property
  113. def community_street(self):
  114. return self._community_street
  115. @community_street.setter
  116. def community_street(self, value):
  117. self._community_street = value
  118. @property
  119. def community_tag(self):
  120. return self._community_tag
  121. @community_tag.setter
  122. def community_tag(self, value):
  123. self._community_tag = value
  124. @property
  125. def district_code(self):
  126. return self._district_code
  127. @district_code.setter
  128. def district_code(self, value):
  129. self._district_code = value
  130. @property
  131. def district_lat(self):
  132. return self._district_lat
  133. @district_lat.setter
  134. def district_lat(self, value):
  135. self._district_lat = value
  136. @property
  137. def district_lng(self):
  138. return self._district_lng
  139. @district_lng.setter
  140. def district_lng(self, value):
  141. self._district_lng = value
  142. @property
  143. def district_name(self):
  144. return self._district_name
  145. @district_name.setter
  146. def district_name(self, value):
  147. self._district_name = value
  148. @property
  149. def subway_stations(self):
  150. return self._subway_stations
  151. @subway_stations.setter
  152. def subway_stations(self, value):
  153. if isinstance(value, list):
  154. self._subway_stations = list()
  155. for i in value:
  156. self._subway_stations.append(i)
  157. def to_alipay_dict(self):
  158. params = dict()
  159. if self.bus_code:
  160. if hasattr(self.bus_code, 'to_alipay_dict'):
  161. params['bus_code'] = self.bus_code.to_alipay_dict()
  162. else:
  163. params['bus_code'] = self.bus_code
  164. if self.bus_lat:
  165. if hasattr(self.bus_lat, 'to_alipay_dict'):
  166. params['bus_lat'] = self.bus_lat.to_alipay_dict()
  167. else:
  168. params['bus_lat'] = self.bus_lat
  169. if self.bus_lng:
  170. if hasattr(self.bus_lng, 'to_alipay_dict'):
  171. params['bus_lng'] = self.bus_lng.to_alipay_dict()
  172. else:
  173. params['bus_lng'] = self.bus_lng
  174. if self.bus_name:
  175. if hasattr(self.bus_name, 'to_alipay_dict'):
  176. params['bus_name'] = self.bus_name.to_alipay_dict()
  177. else:
  178. params['bus_name'] = self.bus_name
  179. if self.bus_radius:
  180. if hasattr(self.bus_radius, 'to_alipay_dict'):
  181. params['bus_radius'] = self.bus_radius.to_alipay_dict()
  182. else:
  183. params['bus_radius'] = self.bus_radius
  184. if self.city_code:
  185. if hasattr(self.city_code, 'to_alipay_dict'):
  186. params['city_code'] = self.city_code.to_alipay_dict()
  187. else:
  188. params['city_code'] = self.city_code
  189. if self.city_lat:
  190. if hasattr(self.city_lat, 'to_alipay_dict'):
  191. params['city_lat'] = self.city_lat.to_alipay_dict()
  192. else:
  193. params['city_lat'] = self.city_lat
  194. if self.city_lng:
  195. if hasattr(self.city_lng, 'to_alipay_dict'):
  196. params['city_lng'] = self.city_lng.to_alipay_dict()
  197. else:
  198. params['city_lng'] = self.city_lng
  199. if self.city_name:
  200. if hasattr(self.city_name, 'to_alipay_dict'):
  201. params['city_name'] = self.city_name.to_alipay_dict()
  202. else:
  203. params['city_name'] = self.city_name
  204. if self.community_code:
  205. if hasattr(self.community_code, 'to_alipay_dict'):
  206. params['community_code'] = self.community_code.to_alipay_dict()
  207. else:
  208. params['community_code'] = self.community_code
  209. if self.community_lat:
  210. if hasattr(self.community_lat, 'to_alipay_dict'):
  211. params['community_lat'] = self.community_lat.to_alipay_dict()
  212. else:
  213. params['community_lat'] = self.community_lat
  214. if self.community_lng:
  215. if hasattr(self.community_lng, 'to_alipay_dict'):
  216. params['community_lng'] = self.community_lng.to_alipay_dict()
  217. else:
  218. params['community_lng'] = self.community_lng
  219. if self.community_name:
  220. if hasattr(self.community_name, 'to_alipay_dict'):
  221. params['community_name'] = self.community_name.to_alipay_dict()
  222. else:
  223. params['community_name'] = self.community_name
  224. if self.community_nong:
  225. if hasattr(self.community_nong, 'to_alipay_dict'):
  226. params['community_nong'] = self.community_nong.to_alipay_dict()
  227. else:
  228. params['community_nong'] = self.community_nong
  229. if self.community_street:
  230. if hasattr(self.community_street, 'to_alipay_dict'):
  231. params['community_street'] = self.community_street.to_alipay_dict()
  232. else:
  233. params['community_street'] = self.community_street
  234. if self.community_tag:
  235. if hasattr(self.community_tag, 'to_alipay_dict'):
  236. params['community_tag'] = self.community_tag.to_alipay_dict()
  237. else:
  238. params['community_tag'] = self.community_tag
  239. if self.district_code:
  240. if hasattr(self.district_code, 'to_alipay_dict'):
  241. params['district_code'] = self.district_code.to_alipay_dict()
  242. else:
  243. params['district_code'] = self.district_code
  244. if self.district_lat:
  245. if hasattr(self.district_lat, 'to_alipay_dict'):
  246. params['district_lat'] = self.district_lat.to_alipay_dict()
  247. else:
  248. params['district_lat'] = self.district_lat
  249. if self.district_lng:
  250. if hasattr(self.district_lng, 'to_alipay_dict'):
  251. params['district_lng'] = self.district_lng.to_alipay_dict()
  252. else:
  253. params['district_lng'] = self.district_lng
  254. if self.district_name:
  255. if hasattr(self.district_name, 'to_alipay_dict'):
  256. params['district_name'] = self.district_name.to_alipay_dict()
  257. else:
  258. params['district_name'] = self.district_name
  259. if self.subway_stations:
  260. if isinstance(self.subway_stations, list):
  261. for i in range(0, len(self.subway_stations)):
  262. element = self.subway_stations[i]
  263. if hasattr(element, 'to_alipay_dict'):
  264. self.subway_stations[i] = element.to_alipay_dict()
  265. if hasattr(self.subway_stations, 'to_alipay_dict'):
  266. params['subway_stations'] = self.subway_stations.to_alipay_dict()
  267. else:
  268. params['subway_stations'] = self.subway_stations
  269. return params
  270. @staticmethod
  271. def from_alipay_dict(d):
  272. if not d:
  273. return None
  274. o = AlipayEcoRenthouseCommunityBaseinfoSyncModel()
  275. if 'bus_code' in d:
  276. o.bus_code = d['bus_code']
  277. if 'bus_lat' in d:
  278. o.bus_lat = d['bus_lat']
  279. if 'bus_lng' in d:
  280. o.bus_lng = d['bus_lng']
  281. if 'bus_name' in d:
  282. o.bus_name = d['bus_name']
  283. if 'bus_radius' in d:
  284. o.bus_radius = d['bus_radius']
  285. if 'city_code' in d:
  286. o.city_code = d['city_code']
  287. if 'city_lat' in d:
  288. o.city_lat = d['city_lat']
  289. if 'city_lng' in d:
  290. o.city_lng = d['city_lng']
  291. if 'city_name' in d:
  292. o.city_name = d['city_name']
  293. if 'community_code' in d:
  294. o.community_code = d['community_code']
  295. if 'community_lat' in d:
  296. o.community_lat = d['community_lat']
  297. if 'community_lng' in d:
  298. o.community_lng = d['community_lng']
  299. if 'community_name' in d:
  300. o.community_name = d['community_name']
  301. if 'community_nong' in d:
  302. o.community_nong = d['community_nong']
  303. if 'community_street' in d:
  304. o.community_street = d['community_street']
  305. if 'community_tag' in d:
  306. o.community_tag = d['community_tag']
  307. if 'district_code' in d:
  308. o.district_code = d['district_code']
  309. if 'district_lat' in d:
  310. o.district_lat = d['district_lat']
  311. if 'district_lng' in d:
  312. o.district_lng = d['district_lng']
  313. if 'district_name' in d:
  314. o.district_name = d['district_name']
  315. if 'subway_stations' in d:
  316. o.subway_stations = d['subway_stations']
  317. return o