AlipayEcoRenthouseCommunityInfoSyncModel.py 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class AlipayEcoRenthouseCommunityInfoSyncModel(object):
  6. def __init__(self):
  7. self._address = None
  8. self._city_code = None
  9. self._city_name = None
  10. self._community_locations = None
  11. self._community_name = None
  12. self._coordsys = None
  13. self._district_code = None
  14. self._district_name = None
  15. self._poi = None
  16. @property
  17. def address(self):
  18. return self._address
  19. @address.setter
  20. def address(self, value):
  21. self._address = value
  22. @property
  23. def city_code(self):
  24. return self._city_code
  25. @city_code.setter
  26. def city_code(self, value):
  27. self._city_code = value
  28. @property
  29. def city_name(self):
  30. return self._city_name
  31. @city_name.setter
  32. def city_name(self, value):
  33. self._city_name = value
  34. @property
  35. def community_locations(self):
  36. return self._community_locations
  37. @community_locations.setter
  38. def community_locations(self, value):
  39. self._community_locations = value
  40. @property
  41. def community_name(self):
  42. return self._community_name
  43. @community_name.setter
  44. def community_name(self, value):
  45. self._community_name = value
  46. @property
  47. def coordsys(self):
  48. return self._coordsys
  49. @coordsys.setter
  50. def coordsys(self, value):
  51. self._coordsys = value
  52. @property
  53. def district_code(self):
  54. return self._district_code
  55. @district_code.setter
  56. def district_code(self, value):
  57. self._district_code = value
  58. @property
  59. def district_name(self):
  60. return self._district_name
  61. @district_name.setter
  62. def district_name(self, value):
  63. self._district_name = value
  64. @property
  65. def poi(self):
  66. return self._poi
  67. @poi.setter
  68. def poi(self, value):
  69. self._poi = value
  70. def to_alipay_dict(self):
  71. params = dict()
  72. if self.address:
  73. if hasattr(self.address, 'to_alipay_dict'):
  74. params['address'] = self.address.to_alipay_dict()
  75. else:
  76. params['address'] = self.address
  77. if self.city_code:
  78. if hasattr(self.city_code, 'to_alipay_dict'):
  79. params['city_code'] = self.city_code.to_alipay_dict()
  80. else:
  81. params['city_code'] = self.city_code
  82. if self.city_name:
  83. if hasattr(self.city_name, 'to_alipay_dict'):
  84. params['city_name'] = self.city_name.to_alipay_dict()
  85. else:
  86. params['city_name'] = self.city_name
  87. if self.community_locations:
  88. if hasattr(self.community_locations, 'to_alipay_dict'):
  89. params['community_locations'] = self.community_locations.to_alipay_dict()
  90. else:
  91. params['community_locations'] = self.community_locations
  92. if self.community_name:
  93. if hasattr(self.community_name, 'to_alipay_dict'):
  94. params['community_name'] = self.community_name.to_alipay_dict()
  95. else:
  96. params['community_name'] = self.community_name
  97. if self.coordsys:
  98. if hasattr(self.coordsys, 'to_alipay_dict'):
  99. params['coordsys'] = self.coordsys.to_alipay_dict()
  100. else:
  101. params['coordsys'] = self.coordsys
  102. if self.district_code:
  103. if hasattr(self.district_code, 'to_alipay_dict'):
  104. params['district_code'] = self.district_code.to_alipay_dict()
  105. else:
  106. params['district_code'] = self.district_code
  107. if self.district_name:
  108. if hasattr(self.district_name, 'to_alipay_dict'):
  109. params['district_name'] = self.district_name.to_alipay_dict()
  110. else:
  111. params['district_name'] = self.district_name
  112. if self.poi:
  113. if hasattr(self.poi, 'to_alipay_dict'):
  114. params['poi'] = self.poi.to_alipay_dict()
  115. else:
  116. params['poi'] = self.poi
  117. return params
  118. @staticmethod
  119. def from_alipay_dict(d):
  120. if not d:
  121. return None
  122. o = AlipayEcoRenthouseCommunityInfoSyncModel()
  123. if 'address' in d:
  124. o.address = d['address']
  125. if 'city_code' in d:
  126. o.city_code = d['city_code']
  127. if 'city_name' in d:
  128. o.city_name = d['city_name']
  129. if 'community_locations' in d:
  130. o.community_locations = d['community_locations']
  131. if 'community_name' in d:
  132. o.community_name = d['community_name']
  133. if 'coordsys' in d:
  134. o.coordsys = d['coordsys']
  135. if 'district_code' in d:
  136. o.district_code = d['district_code']
  137. if 'district_name' in d:
  138. o.district_name = d['district_name']
  139. if 'poi' in d:
  140. o.poi = d['poi']
  141. return o