AlipayCommerceIotMdeviceprodShopCreateModel.py 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class AlipayCommerceIotMdeviceprodShopCreateModel(object):
  6. def __init__(self):
  7. self._address = None
  8. self._city = None
  9. self._creator_pid = None
  10. self._district = None
  11. self._ext_info = None
  12. self._industry_category = None
  13. self._merchant_pid = None
  14. self._province = None
  15. self._shop_name = None
  16. self._shop_property = None
  17. self._shop_type = None
  18. @property
  19. def address(self):
  20. return self._address
  21. @address.setter
  22. def address(self, value):
  23. self._address = value
  24. @property
  25. def city(self):
  26. return self._city
  27. @city.setter
  28. def city(self, value):
  29. self._city = value
  30. @property
  31. def creator_pid(self):
  32. return self._creator_pid
  33. @creator_pid.setter
  34. def creator_pid(self, value):
  35. self._creator_pid = value
  36. @property
  37. def district(self):
  38. return self._district
  39. @district.setter
  40. def district(self, value):
  41. self._district = value
  42. @property
  43. def ext_info(self):
  44. return self._ext_info
  45. @ext_info.setter
  46. def ext_info(self, value):
  47. self._ext_info = value
  48. @property
  49. def industry_category(self):
  50. return self._industry_category
  51. @industry_category.setter
  52. def industry_category(self, value):
  53. self._industry_category = value
  54. @property
  55. def merchant_pid(self):
  56. return self._merchant_pid
  57. @merchant_pid.setter
  58. def merchant_pid(self, value):
  59. self._merchant_pid = value
  60. @property
  61. def province(self):
  62. return self._province
  63. @province.setter
  64. def province(self, value):
  65. self._province = value
  66. @property
  67. def shop_name(self):
  68. return self._shop_name
  69. @shop_name.setter
  70. def shop_name(self, value):
  71. self._shop_name = value
  72. @property
  73. def shop_property(self):
  74. return self._shop_property
  75. @shop_property.setter
  76. def shop_property(self, value):
  77. self._shop_property = value
  78. @property
  79. def shop_type(self):
  80. return self._shop_type
  81. @shop_type.setter
  82. def shop_type(self, value):
  83. self._shop_type = value
  84. def to_alipay_dict(self):
  85. params = dict()
  86. if self.address:
  87. if hasattr(self.address, 'to_alipay_dict'):
  88. params['address'] = self.address.to_alipay_dict()
  89. else:
  90. params['address'] = self.address
  91. if self.city:
  92. if hasattr(self.city, 'to_alipay_dict'):
  93. params['city'] = self.city.to_alipay_dict()
  94. else:
  95. params['city'] = self.city
  96. if self.creator_pid:
  97. if hasattr(self.creator_pid, 'to_alipay_dict'):
  98. params['creator_pid'] = self.creator_pid.to_alipay_dict()
  99. else:
  100. params['creator_pid'] = self.creator_pid
  101. if self.district:
  102. if hasattr(self.district, 'to_alipay_dict'):
  103. params['district'] = self.district.to_alipay_dict()
  104. else:
  105. params['district'] = self.district
  106. if self.ext_info:
  107. if hasattr(self.ext_info, 'to_alipay_dict'):
  108. params['ext_info'] = self.ext_info.to_alipay_dict()
  109. else:
  110. params['ext_info'] = self.ext_info
  111. if self.industry_category:
  112. if hasattr(self.industry_category, 'to_alipay_dict'):
  113. params['industry_category'] = self.industry_category.to_alipay_dict()
  114. else:
  115. params['industry_category'] = self.industry_category
  116. if self.merchant_pid:
  117. if hasattr(self.merchant_pid, 'to_alipay_dict'):
  118. params['merchant_pid'] = self.merchant_pid.to_alipay_dict()
  119. else:
  120. params['merchant_pid'] = self.merchant_pid
  121. if self.province:
  122. if hasattr(self.province, 'to_alipay_dict'):
  123. params['province'] = self.province.to_alipay_dict()
  124. else:
  125. params['province'] = self.province
  126. if self.shop_name:
  127. if hasattr(self.shop_name, 'to_alipay_dict'):
  128. params['shop_name'] = self.shop_name.to_alipay_dict()
  129. else:
  130. params['shop_name'] = self.shop_name
  131. if self.shop_property:
  132. if hasattr(self.shop_property, 'to_alipay_dict'):
  133. params['shop_property'] = self.shop_property.to_alipay_dict()
  134. else:
  135. params['shop_property'] = self.shop_property
  136. if self.shop_type:
  137. if hasattr(self.shop_type, 'to_alipay_dict'):
  138. params['shop_type'] = self.shop_type.to_alipay_dict()
  139. else:
  140. params['shop_type'] = self.shop_type
  141. return params
  142. @staticmethod
  143. def from_alipay_dict(d):
  144. if not d:
  145. return None
  146. o = AlipayCommerceIotMdeviceprodShopCreateModel()
  147. if 'address' in d:
  148. o.address = d['address']
  149. if 'city' in d:
  150. o.city = d['city']
  151. if 'creator_pid' in d:
  152. o.creator_pid = d['creator_pid']
  153. if 'district' in d:
  154. o.district = d['district']
  155. if 'ext_info' in d:
  156. o.ext_info = d['ext_info']
  157. if 'industry_category' in d:
  158. o.industry_category = d['industry_category']
  159. if 'merchant_pid' in d:
  160. o.merchant_pid = d['merchant_pid']
  161. if 'province' in d:
  162. o.province = d['province']
  163. if 'shop_name' in d:
  164. o.shop_name = d['shop_name']
  165. if 'shop_property' in d:
  166. o.shop_property = d['shop_property']
  167. if 'shop_type' in d:
  168. o.shop_type = d['shop_type']
  169. return o