ZhimaCreditPeIndustryLocationUploadModel.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 ZhimaCreditPeIndustryLocationUploadModel(object):
  6. def __init__(self):
  7. self._biz_scene = None
  8. self._can_use = None
  9. self._ext_info = None
  10. self._latitude = None
  11. self._location_address = None
  12. self._location_code = None
  13. self._location_name = None
  14. self._longitude = None
  15. self._product_code = None
  16. @property
  17. def biz_scene(self):
  18. return self._biz_scene
  19. @biz_scene.setter
  20. def biz_scene(self, value):
  21. self._biz_scene = value
  22. @property
  23. def can_use(self):
  24. return self._can_use
  25. @can_use.setter
  26. def can_use(self, value):
  27. self._can_use = value
  28. @property
  29. def ext_info(self):
  30. return self._ext_info
  31. @ext_info.setter
  32. def ext_info(self, value):
  33. self._ext_info = value
  34. @property
  35. def latitude(self):
  36. return self._latitude
  37. @latitude.setter
  38. def latitude(self, value):
  39. self._latitude = value
  40. @property
  41. def location_address(self):
  42. return self._location_address
  43. @location_address.setter
  44. def location_address(self, value):
  45. self._location_address = value
  46. @property
  47. def location_code(self):
  48. return self._location_code
  49. @location_code.setter
  50. def location_code(self, value):
  51. self._location_code = value
  52. @property
  53. def location_name(self):
  54. return self._location_name
  55. @location_name.setter
  56. def location_name(self, value):
  57. self._location_name = value
  58. @property
  59. def longitude(self):
  60. return self._longitude
  61. @longitude.setter
  62. def longitude(self, value):
  63. self._longitude = value
  64. @property
  65. def product_code(self):
  66. return self._product_code
  67. @product_code.setter
  68. def product_code(self, value):
  69. self._product_code = value
  70. def to_alipay_dict(self):
  71. params = dict()
  72. if self.biz_scene:
  73. if hasattr(self.biz_scene, 'to_alipay_dict'):
  74. params['biz_scene'] = self.biz_scene.to_alipay_dict()
  75. else:
  76. params['biz_scene'] = self.biz_scene
  77. if self.can_use:
  78. if hasattr(self.can_use, 'to_alipay_dict'):
  79. params['can_use'] = self.can_use.to_alipay_dict()
  80. else:
  81. params['can_use'] = self.can_use
  82. if self.ext_info:
  83. if hasattr(self.ext_info, 'to_alipay_dict'):
  84. params['ext_info'] = self.ext_info.to_alipay_dict()
  85. else:
  86. params['ext_info'] = self.ext_info
  87. if self.latitude:
  88. if hasattr(self.latitude, 'to_alipay_dict'):
  89. params['latitude'] = self.latitude.to_alipay_dict()
  90. else:
  91. params['latitude'] = self.latitude
  92. if self.location_address:
  93. if hasattr(self.location_address, 'to_alipay_dict'):
  94. params['location_address'] = self.location_address.to_alipay_dict()
  95. else:
  96. params['location_address'] = self.location_address
  97. if self.location_code:
  98. if hasattr(self.location_code, 'to_alipay_dict'):
  99. params['location_code'] = self.location_code.to_alipay_dict()
  100. else:
  101. params['location_code'] = self.location_code
  102. if self.location_name:
  103. if hasattr(self.location_name, 'to_alipay_dict'):
  104. params['location_name'] = self.location_name.to_alipay_dict()
  105. else:
  106. params['location_name'] = self.location_name
  107. if self.longitude:
  108. if hasattr(self.longitude, 'to_alipay_dict'):
  109. params['longitude'] = self.longitude.to_alipay_dict()
  110. else:
  111. params['longitude'] = self.longitude
  112. if self.product_code:
  113. if hasattr(self.product_code, 'to_alipay_dict'):
  114. params['product_code'] = self.product_code.to_alipay_dict()
  115. else:
  116. params['product_code'] = self.product_code
  117. return params
  118. @staticmethod
  119. def from_alipay_dict(d):
  120. if not d:
  121. return None
  122. o = ZhimaCreditPeIndustryLocationUploadModel()
  123. if 'biz_scene' in d:
  124. o.biz_scene = d['biz_scene']
  125. if 'can_use' in d:
  126. o.can_use = d['can_use']
  127. if 'ext_info' in d:
  128. o.ext_info = d['ext_info']
  129. if 'latitude' in d:
  130. o.latitude = d['latitude']
  131. if 'location_address' in d:
  132. o.location_address = d['location_address']
  133. if 'location_code' in d:
  134. o.location_code = d['location_code']
  135. if 'location_name' in d:
  136. o.location_name = d['location_name']
  137. if 'longitude' in d:
  138. o.longitude = d['longitude']
  139. if 'product_code' in d:
  140. o.product_code = d['product_code']
  141. return o