AlipayEcoCplifeCommunityModifyModel.py 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class AlipayEcoCplifeCommunityModifyModel(object):
  6. def __init__(self):
  7. self._associated_pois = None
  8. self._city_code = None
  9. self._community_address = None
  10. self._community_id = None
  11. self._community_locations = None
  12. self._community_name = None
  13. self._district_code = None
  14. self._hotline = None
  15. self._out_community_id = None
  16. self._province_code = None
  17. @property
  18. def associated_pois(self):
  19. return self._associated_pois
  20. @associated_pois.setter
  21. def associated_pois(self, value):
  22. if isinstance(value, list):
  23. self._associated_pois = list()
  24. for i in value:
  25. self._associated_pois.append(i)
  26. @property
  27. def city_code(self):
  28. return self._city_code
  29. @city_code.setter
  30. def city_code(self, value):
  31. self._city_code = value
  32. @property
  33. def community_address(self):
  34. return self._community_address
  35. @community_address.setter
  36. def community_address(self, value):
  37. self._community_address = value
  38. @property
  39. def community_id(self):
  40. return self._community_id
  41. @community_id.setter
  42. def community_id(self, value):
  43. self._community_id = value
  44. @property
  45. def community_locations(self):
  46. return self._community_locations
  47. @community_locations.setter
  48. def community_locations(self, value):
  49. if isinstance(value, list):
  50. self._community_locations = list()
  51. for i in value:
  52. self._community_locations.append(i)
  53. @property
  54. def community_name(self):
  55. return self._community_name
  56. @community_name.setter
  57. def community_name(self, value):
  58. self._community_name = value
  59. @property
  60. def district_code(self):
  61. return self._district_code
  62. @district_code.setter
  63. def district_code(self, value):
  64. self._district_code = value
  65. @property
  66. def hotline(self):
  67. return self._hotline
  68. @hotline.setter
  69. def hotline(self, value):
  70. self._hotline = value
  71. @property
  72. def out_community_id(self):
  73. return self._out_community_id
  74. @out_community_id.setter
  75. def out_community_id(self, value):
  76. self._out_community_id = value
  77. @property
  78. def province_code(self):
  79. return self._province_code
  80. @province_code.setter
  81. def province_code(self, value):
  82. self._province_code = value
  83. def to_alipay_dict(self):
  84. params = dict()
  85. if self.associated_pois:
  86. if isinstance(self.associated_pois, list):
  87. for i in range(0, len(self.associated_pois)):
  88. element = self.associated_pois[i]
  89. if hasattr(element, 'to_alipay_dict'):
  90. self.associated_pois[i] = element.to_alipay_dict()
  91. if hasattr(self.associated_pois, 'to_alipay_dict'):
  92. params['associated_pois'] = self.associated_pois.to_alipay_dict()
  93. else:
  94. params['associated_pois'] = self.associated_pois
  95. if self.city_code:
  96. if hasattr(self.city_code, 'to_alipay_dict'):
  97. params['city_code'] = self.city_code.to_alipay_dict()
  98. else:
  99. params['city_code'] = self.city_code
  100. if self.community_address:
  101. if hasattr(self.community_address, 'to_alipay_dict'):
  102. params['community_address'] = self.community_address.to_alipay_dict()
  103. else:
  104. params['community_address'] = self.community_address
  105. if self.community_id:
  106. if hasattr(self.community_id, 'to_alipay_dict'):
  107. params['community_id'] = self.community_id.to_alipay_dict()
  108. else:
  109. params['community_id'] = self.community_id
  110. if self.community_locations:
  111. if isinstance(self.community_locations, list):
  112. for i in range(0, len(self.community_locations)):
  113. element = self.community_locations[i]
  114. if hasattr(element, 'to_alipay_dict'):
  115. self.community_locations[i] = element.to_alipay_dict()
  116. if hasattr(self.community_locations, 'to_alipay_dict'):
  117. params['community_locations'] = self.community_locations.to_alipay_dict()
  118. else:
  119. params['community_locations'] = self.community_locations
  120. if self.community_name:
  121. if hasattr(self.community_name, 'to_alipay_dict'):
  122. params['community_name'] = self.community_name.to_alipay_dict()
  123. else:
  124. params['community_name'] = self.community_name
  125. if self.district_code:
  126. if hasattr(self.district_code, 'to_alipay_dict'):
  127. params['district_code'] = self.district_code.to_alipay_dict()
  128. else:
  129. params['district_code'] = self.district_code
  130. if self.hotline:
  131. if hasattr(self.hotline, 'to_alipay_dict'):
  132. params['hotline'] = self.hotline.to_alipay_dict()
  133. else:
  134. params['hotline'] = self.hotline
  135. if self.out_community_id:
  136. if hasattr(self.out_community_id, 'to_alipay_dict'):
  137. params['out_community_id'] = self.out_community_id.to_alipay_dict()
  138. else:
  139. params['out_community_id'] = self.out_community_id
  140. if self.province_code:
  141. if hasattr(self.province_code, 'to_alipay_dict'):
  142. params['province_code'] = self.province_code.to_alipay_dict()
  143. else:
  144. params['province_code'] = self.province_code
  145. return params
  146. @staticmethod
  147. def from_alipay_dict(d):
  148. if not d:
  149. return None
  150. o = AlipayEcoCplifeCommunityModifyModel()
  151. if 'associated_pois' in d:
  152. o.associated_pois = d['associated_pois']
  153. if 'city_code' in d:
  154. o.city_code = d['city_code']
  155. if 'community_address' in d:
  156. o.community_address = d['community_address']
  157. if 'community_id' in d:
  158. o.community_id = d['community_id']
  159. if 'community_locations' in d:
  160. o.community_locations = d['community_locations']
  161. if 'community_name' in d:
  162. o.community_name = d['community_name']
  163. if 'district_code' in d:
  164. o.district_code = d['district_code']
  165. if 'hotline' in d:
  166. o.hotline = d['hotline']
  167. if 'out_community_id' in d:
  168. o.out_community_id = d['out_community_id']
  169. if 'province_code' in d:
  170. o.province_code = d['province_code']
  171. return o