AlipayOverseasTravelPromotionGetModel.py 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class AlipayOverseasTravelPromotionGetModel(object):
  6. def __init__(self):
  7. self._biz_area_codes = None
  8. self._ch_info = None
  9. self._city_codes = None
  10. self._country_codes = None
  11. self._latitude = None
  12. self._lbs_reverse_level = None
  13. self._longitude = None
  14. self._page_no = None
  15. self._page_size = None
  16. self._radius = None
  17. self._scene_code = None
  18. self._shop_id = None
  19. self._top_promotion_ids = None
  20. self._unique_id = None
  21. self._user_id = None
  22. self._user_id_type = None
  23. @property
  24. def biz_area_codes(self):
  25. return self._biz_area_codes
  26. @biz_area_codes.setter
  27. def biz_area_codes(self, value):
  28. if isinstance(value, list):
  29. self._biz_area_codes = list()
  30. for i in value:
  31. self._biz_area_codes.append(i)
  32. @property
  33. def ch_info(self):
  34. return self._ch_info
  35. @ch_info.setter
  36. def ch_info(self, value):
  37. self._ch_info = value
  38. @property
  39. def city_codes(self):
  40. return self._city_codes
  41. @city_codes.setter
  42. def city_codes(self, value):
  43. if isinstance(value, list):
  44. self._city_codes = list()
  45. for i in value:
  46. self._city_codes.append(i)
  47. @property
  48. def country_codes(self):
  49. return self._country_codes
  50. @country_codes.setter
  51. def country_codes(self, value):
  52. if isinstance(value, list):
  53. self._country_codes = list()
  54. for i in value:
  55. self._country_codes.append(i)
  56. @property
  57. def latitude(self):
  58. return self._latitude
  59. @latitude.setter
  60. def latitude(self, value):
  61. self._latitude = value
  62. @property
  63. def lbs_reverse_level(self):
  64. return self._lbs_reverse_level
  65. @lbs_reverse_level.setter
  66. def lbs_reverse_level(self, value):
  67. self._lbs_reverse_level = value
  68. @property
  69. def longitude(self):
  70. return self._longitude
  71. @longitude.setter
  72. def longitude(self, value):
  73. self._longitude = value
  74. @property
  75. def page_no(self):
  76. return self._page_no
  77. @page_no.setter
  78. def page_no(self, value):
  79. self._page_no = value
  80. @property
  81. def page_size(self):
  82. return self._page_size
  83. @page_size.setter
  84. def page_size(self, value):
  85. self._page_size = value
  86. @property
  87. def radius(self):
  88. return self._radius
  89. @radius.setter
  90. def radius(self, value):
  91. self._radius = value
  92. @property
  93. def scene_code(self):
  94. return self._scene_code
  95. @scene_code.setter
  96. def scene_code(self, value):
  97. self._scene_code = value
  98. @property
  99. def shop_id(self):
  100. return self._shop_id
  101. @shop_id.setter
  102. def shop_id(self, value):
  103. self._shop_id = value
  104. @property
  105. def top_promotion_ids(self):
  106. return self._top_promotion_ids
  107. @top_promotion_ids.setter
  108. def top_promotion_ids(self, value):
  109. if isinstance(value, list):
  110. self._top_promotion_ids = list()
  111. for i in value:
  112. self._top_promotion_ids.append(i)
  113. @property
  114. def unique_id(self):
  115. return self._unique_id
  116. @unique_id.setter
  117. def unique_id(self, value):
  118. self._unique_id = value
  119. @property
  120. def user_id(self):
  121. return self._user_id
  122. @user_id.setter
  123. def user_id(self, value):
  124. self._user_id = value
  125. @property
  126. def user_id_type(self):
  127. return self._user_id_type
  128. @user_id_type.setter
  129. def user_id_type(self, value):
  130. self._user_id_type = value
  131. def to_alipay_dict(self):
  132. params = dict()
  133. if self.biz_area_codes:
  134. if isinstance(self.biz_area_codes, list):
  135. for i in range(0, len(self.biz_area_codes)):
  136. element = self.biz_area_codes[i]
  137. if hasattr(element, 'to_alipay_dict'):
  138. self.biz_area_codes[i] = element.to_alipay_dict()
  139. if hasattr(self.biz_area_codes, 'to_alipay_dict'):
  140. params['biz_area_codes'] = self.biz_area_codes.to_alipay_dict()
  141. else:
  142. params['biz_area_codes'] = self.biz_area_codes
  143. if self.ch_info:
  144. if hasattr(self.ch_info, 'to_alipay_dict'):
  145. params['ch_info'] = self.ch_info.to_alipay_dict()
  146. else:
  147. params['ch_info'] = self.ch_info
  148. if self.city_codes:
  149. if isinstance(self.city_codes, list):
  150. for i in range(0, len(self.city_codes)):
  151. element = self.city_codes[i]
  152. if hasattr(element, 'to_alipay_dict'):
  153. self.city_codes[i] = element.to_alipay_dict()
  154. if hasattr(self.city_codes, 'to_alipay_dict'):
  155. params['city_codes'] = self.city_codes.to_alipay_dict()
  156. else:
  157. params['city_codes'] = self.city_codes
  158. if self.country_codes:
  159. if isinstance(self.country_codes, list):
  160. for i in range(0, len(self.country_codes)):
  161. element = self.country_codes[i]
  162. if hasattr(element, 'to_alipay_dict'):
  163. self.country_codes[i] = element.to_alipay_dict()
  164. if hasattr(self.country_codes, 'to_alipay_dict'):
  165. params['country_codes'] = self.country_codes.to_alipay_dict()
  166. else:
  167. params['country_codes'] = self.country_codes
  168. if self.latitude:
  169. if hasattr(self.latitude, 'to_alipay_dict'):
  170. params['latitude'] = self.latitude.to_alipay_dict()
  171. else:
  172. params['latitude'] = self.latitude
  173. if self.lbs_reverse_level:
  174. if hasattr(self.lbs_reverse_level, 'to_alipay_dict'):
  175. params['lbs_reverse_level'] = self.lbs_reverse_level.to_alipay_dict()
  176. else:
  177. params['lbs_reverse_level'] = self.lbs_reverse_level
  178. if self.longitude:
  179. if hasattr(self.longitude, 'to_alipay_dict'):
  180. params['longitude'] = self.longitude.to_alipay_dict()
  181. else:
  182. params['longitude'] = self.longitude
  183. if self.page_no:
  184. if hasattr(self.page_no, 'to_alipay_dict'):
  185. params['page_no'] = self.page_no.to_alipay_dict()
  186. else:
  187. params['page_no'] = self.page_no
  188. if self.page_size:
  189. if hasattr(self.page_size, 'to_alipay_dict'):
  190. params['page_size'] = self.page_size.to_alipay_dict()
  191. else:
  192. params['page_size'] = self.page_size
  193. if self.radius:
  194. if hasattr(self.radius, 'to_alipay_dict'):
  195. params['radius'] = self.radius.to_alipay_dict()
  196. else:
  197. params['radius'] = self.radius
  198. if self.scene_code:
  199. if hasattr(self.scene_code, 'to_alipay_dict'):
  200. params['scene_code'] = self.scene_code.to_alipay_dict()
  201. else:
  202. params['scene_code'] = self.scene_code
  203. if self.shop_id:
  204. if hasattr(self.shop_id, 'to_alipay_dict'):
  205. params['shop_id'] = self.shop_id.to_alipay_dict()
  206. else:
  207. params['shop_id'] = self.shop_id
  208. if self.top_promotion_ids:
  209. if isinstance(self.top_promotion_ids, list):
  210. for i in range(0, len(self.top_promotion_ids)):
  211. element = self.top_promotion_ids[i]
  212. if hasattr(element, 'to_alipay_dict'):
  213. self.top_promotion_ids[i] = element.to_alipay_dict()
  214. if hasattr(self.top_promotion_ids, 'to_alipay_dict'):
  215. params['top_promotion_ids'] = self.top_promotion_ids.to_alipay_dict()
  216. else:
  217. params['top_promotion_ids'] = self.top_promotion_ids
  218. if self.unique_id:
  219. if hasattr(self.unique_id, 'to_alipay_dict'):
  220. params['unique_id'] = self.unique_id.to_alipay_dict()
  221. else:
  222. params['unique_id'] = self.unique_id
  223. if self.user_id:
  224. if hasattr(self.user_id, 'to_alipay_dict'):
  225. params['user_id'] = self.user_id.to_alipay_dict()
  226. else:
  227. params['user_id'] = self.user_id
  228. if self.user_id_type:
  229. if hasattr(self.user_id_type, 'to_alipay_dict'):
  230. params['user_id_type'] = self.user_id_type.to_alipay_dict()
  231. else:
  232. params['user_id_type'] = self.user_id_type
  233. return params
  234. @staticmethod
  235. def from_alipay_dict(d):
  236. if not d:
  237. return None
  238. o = AlipayOverseasTravelPromotionGetModel()
  239. if 'biz_area_codes' in d:
  240. o.biz_area_codes = d['biz_area_codes']
  241. if 'ch_info' in d:
  242. o.ch_info = d['ch_info']
  243. if 'city_codes' in d:
  244. o.city_codes = d['city_codes']
  245. if 'country_codes' in d:
  246. o.country_codes = d['country_codes']
  247. if 'latitude' in d:
  248. o.latitude = d['latitude']
  249. if 'lbs_reverse_level' in d:
  250. o.lbs_reverse_level = d['lbs_reverse_level']
  251. if 'longitude' in d:
  252. o.longitude = d['longitude']
  253. if 'page_no' in d:
  254. o.page_no = d['page_no']
  255. if 'page_size' in d:
  256. o.page_size = d['page_size']
  257. if 'radius' in d:
  258. o.radius = d['radius']
  259. if 'scene_code' in d:
  260. o.scene_code = d['scene_code']
  261. if 'shop_id' in d:
  262. o.shop_id = d['shop_id']
  263. if 'top_promotion_ids' in d:
  264. o.top_promotion_ids = d['top_promotion_ids']
  265. if 'unique_id' in d:
  266. o.unique_id = d['unique_id']
  267. if 'user_id' in d:
  268. o.user_id = d['user_id']
  269. if 'user_id_type' in d:
  270. o.user_id_type = d['user_id_type']
  271. return o