AlipayEcoMycarMaintainShopCreateModel.py 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class AlipayEcoMycarMaintainShopCreateModel(object):
  6. def __init__(self):
  7. self._address = None
  8. self._alipay_account = None
  9. self._brand_ids = None
  10. self._city_code = None
  11. self._close_time = None
  12. self._contact_email = None
  13. self._contact_mobile_phone = None
  14. self._contact_name = None
  15. self._district_code = None
  16. self._ext_param = None
  17. self._industry_app_category_id = None
  18. self._industry_category_id = None
  19. self._lat = None
  20. self._lon = None
  21. self._main_image = None
  22. self._merchant_branch_id = None
  23. self._open_time = None
  24. self._other_images = None
  25. self._out_shop_id = None
  26. self._province_code = None
  27. self._shop_branch_name = None
  28. self._shop_name = None
  29. self._shop_tel = None
  30. self._shop_type = None
  31. self._status = None
  32. @property
  33. def address(self):
  34. return self._address
  35. @address.setter
  36. def address(self, value):
  37. self._address = value
  38. @property
  39. def alipay_account(self):
  40. return self._alipay_account
  41. @alipay_account.setter
  42. def alipay_account(self, value):
  43. self._alipay_account = value
  44. @property
  45. def brand_ids(self):
  46. return self._brand_ids
  47. @brand_ids.setter
  48. def brand_ids(self, value):
  49. if isinstance(value, list):
  50. self._brand_ids = list()
  51. for i in value:
  52. self._brand_ids.append(i)
  53. @property
  54. def city_code(self):
  55. return self._city_code
  56. @city_code.setter
  57. def city_code(self, value):
  58. self._city_code = value
  59. @property
  60. def close_time(self):
  61. return self._close_time
  62. @close_time.setter
  63. def close_time(self, value):
  64. self._close_time = value
  65. @property
  66. def contact_email(self):
  67. return self._contact_email
  68. @contact_email.setter
  69. def contact_email(self, value):
  70. self._contact_email = value
  71. @property
  72. def contact_mobile_phone(self):
  73. return self._contact_mobile_phone
  74. @contact_mobile_phone.setter
  75. def contact_mobile_phone(self, value):
  76. self._contact_mobile_phone = value
  77. @property
  78. def contact_name(self):
  79. return self._contact_name
  80. @contact_name.setter
  81. def contact_name(self, value):
  82. self._contact_name = value
  83. @property
  84. def district_code(self):
  85. return self._district_code
  86. @district_code.setter
  87. def district_code(self, value):
  88. self._district_code = value
  89. @property
  90. def ext_param(self):
  91. return self._ext_param
  92. @ext_param.setter
  93. def ext_param(self, value):
  94. self._ext_param = value
  95. @property
  96. def industry_app_category_id(self):
  97. return self._industry_app_category_id
  98. @industry_app_category_id.setter
  99. def industry_app_category_id(self, value):
  100. if isinstance(value, list):
  101. self._industry_app_category_id = list()
  102. for i in value:
  103. self._industry_app_category_id.append(i)
  104. @property
  105. def industry_category_id(self):
  106. return self._industry_category_id
  107. @industry_category_id.setter
  108. def industry_category_id(self, value):
  109. if isinstance(value, list):
  110. self._industry_category_id = list()
  111. for i in value:
  112. self._industry_category_id.append(i)
  113. @property
  114. def lat(self):
  115. return self._lat
  116. @lat.setter
  117. def lat(self, value):
  118. self._lat = value
  119. @property
  120. def lon(self):
  121. return self._lon
  122. @lon.setter
  123. def lon(self, value):
  124. self._lon = value
  125. @property
  126. def main_image(self):
  127. return self._main_image
  128. @main_image.setter
  129. def main_image(self, value):
  130. self._main_image = value
  131. @property
  132. def merchant_branch_id(self):
  133. return self._merchant_branch_id
  134. @merchant_branch_id.setter
  135. def merchant_branch_id(self, value):
  136. self._merchant_branch_id = value
  137. @property
  138. def open_time(self):
  139. return self._open_time
  140. @open_time.setter
  141. def open_time(self, value):
  142. self._open_time = value
  143. @property
  144. def other_images(self):
  145. return self._other_images
  146. @other_images.setter
  147. def other_images(self, value):
  148. if isinstance(value, list):
  149. self._other_images = list()
  150. for i in value:
  151. self._other_images.append(i)
  152. @property
  153. def out_shop_id(self):
  154. return self._out_shop_id
  155. @out_shop_id.setter
  156. def out_shop_id(self, value):
  157. self._out_shop_id = value
  158. @property
  159. def province_code(self):
  160. return self._province_code
  161. @province_code.setter
  162. def province_code(self, value):
  163. self._province_code = value
  164. @property
  165. def shop_branch_name(self):
  166. return self._shop_branch_name
  167. @shop_branch_name.setter
  168. def shop_branch_name(self, value):
  169. self._shop_branch_name = value
  170. @property
  171. def shop_name(self):
  172. return self._shop_name
  173. @shop_name.setter
  174. def shop_name(self, value):
  175. self._shop_name = value
  176. @property
  177. def shop_tel(self):
  178. return self._shop_tel
  179. @shop_tel.setter
  180. def shop_tel(self, value):
  181. self._shop_tel = value
  182. @property
  183. def shop_type(self):
  184. return self._shop_type
  185. @shop_type.setter
  186. def shop_type(self, value):
  187. self._shop_type = value
  188. @property
  189. def status(self):
  190. return self._status
  191. @status.setter
  192. def status(self, value):
  193. self._status = value
  194. def to_alipay_dict(self):
  195. params = dict()
  196. if self.address:
  197. if hasattr(self.address, 'to_alipay_dict'):
  198. params['address'] = self.address.to_alipay_dict()
  199. else:
  200. params['address'] = self.address
  201. if self.alipay_account:
  202. if hasattr(self.alipay_account, 'to_alipay_dict'):
  203. params['alipay_account'] = self.alipay_account.to_alipay_dict()
  204. else:
  205. params['alipay_account'] = self.alipay_account
  206. if self.brand_ids:
  207. if isinstance(self.brand_ids, list):
  208. for i in range(0, len(self.brand_ids)):
  209. element = self.brand_ids[i]
  210. if hasattr(element, 'to_alipay_dict'):
  211. self.brand_ids[i] = element.to_alipay_dict()
  212. if hasattr(self.brand_ids, 'to_alipay_dict'):
  213. params['brand_ids'] = self.brand_ids.to_alipay_dict()
  214. else:
  215. params['brand_ids'] = self.brand_ids
  216. if self.city_code:
  217. if hasattr(self.city_code, 'to_alipay_dict'):
  218. params['city_code'] = self.city_code.to_alipay_dict()
  219. else:
  220. params['city_code'] = self.city_code
  221. if self.close_time:
  222. if hasattr(self.close_time, 'to_alipay_dict'):
  223. params['close_time'] = self.close_time.to_alipay_dict()
  224. else:
  225. params['close_time'] = self.close_time
  226. if self.contact_email:
  227. if hasattr(self.contact_email, 'to_alipay_dict'):
  228. params['contact_email'] = self.contact_email.to_alipay_dict()
  229. else:
  230. params['contact_email'] = self.contact_email
  231. if self.contact_mobile_phone:
  232. if hasattr(self.contact_mobile_phone, 'to_alipay_dict'):
  233. params['contact_mobile_phone'] = self.contact_mobile_phone.to_alipay_dict()
  234. else:
  235. params['contact_mobile_phone'] = self.contact_mobile_phone
  236. if self.contact_name:
  237. if hasattr(self.contact_name, 'to_alipay_dict'):
  238. params['contact_name'] = self.contact_name.to_alipay_dict()
  239. else:
  240. params['contact_name'] = self.contact_name
  241. if self.district_code:
  242. if hasattr(self.district_code, 'to_alipay_dict'):
  243. params['district_code'] = self.district_code.to_alipay_dict()
  244. else:
  245. params['district_code'] = self.district_code
  246. if self.ext_param:
  247. if hasattr(self.ext_param, 'to_alipay_dict'):
  248. params['ext_param'] = self.ext_param.to_alipay_dict()
  249. else:
  250. params['ext_param'] = self.ext_param
  251. if self.industry_app_category_id:
  252. if isinstance(self.industry_app_category_id, list):
  253. for i in range(0, len(self.industry_app_category_id)):
  254. element = self.industry_app_category_id[i]
  255. if hasattr(element, 'to_alipay_dict'):
  256. self.industry_app_category_id[i] = element.to_alipay_dict()
  257. if hasattr(self.industry_app_category_id, 'to_alipay_dict'):
  258. params['industry_app_category_id'] = self.industry_app_category_id.to_alipay_dict()
  259. else:
  260. params['industry_app_category_id'] = self.industry_app_category_id
  261. if self.industry_category_id:
  262. if isinstance(self.industry_category_id, list):
  263. for i in range(0, len(self.industry_category_id)):
  264. element = self.industry_category_id[i]
  265. if hasattr(element, 'to_alipay_dict'):
  266. self.industry_category_id[i] = element.to_alipay_dict()
  267. if hasattr(self.industry_category_id, 'to_alipay_dict'):
  268. params['industry_category_id'] = self.industry_category_id.to_alipay_dict()
  269. else:
  270. params['industry_category_id'] = self.industry_category_id
  271. if self.lat:
  272. if hasattr(self.lat, 'to_alipay_dict'):
  273. params['lat'] = self.lat.to_alipay_dict()
  274. else:
  275. params['lat'] = self.lat
  276. if self.lon:
  277. if hasattr(self.lon, 'to_alipay_dict'):
  278. params['lon'] = self.lon.to_alipay_dict()
  279. else:
  280. params['lon'] = self.lon
  281. if self.main_image:
  282. if hasattr(self.main_image, 'to_alipay_dict'):
  283. params['main_image'] = self.main_image.to_alipay_dict()
  284. else:
  285. params['main_image'] = self.main_image
  286. if self.merchant_branch_id:
  287. if hasattr(self.merchant_branch_id, 'to_alipay_dict'):
  288. params['merchant_branch_id'] = self.merchant_branch_id.to_alipay_dict()
  289. else:
  290. params['merchant_branch_id'] = self.merchant_branch_id
  291. if self.open_time:
  292. if hasattr(self.open_time, 'to_alipay_dict'):
  293. params['open_time'] = self.open_time.to_alipay_dict()
  294. else:
  295. params['open_time'] = self.open_time
  296. if self.other_images:
  297. if isinstance(self.other_images, list):
  298. for i in range(0, len(self.other_images)):
  299. element = self.other_images[i]
  300. if hasattr(element, 'to_alipay_dict'):
  301. self.other_images[i] = element.to_alipay_dict()
  302. if hasattr(self.other_images, 'to_alipay_dict'):
  303. params['other_images'] = self.other_images.to_alipay_dict()
  304. else:
  305. params['other_images'] = self.other_images
  306. if self.out_shop_id:
  307. if hasattr(self.out_shop_id, 'to_alipay_dict'):
  308. params['out_shop_id'] = self.out_shop_id.to_alipay_dict()
  309. else:
  310. params['out_shop_id'] = self.out_shop_id
  311. if self.province_code:
  312. if hasattr(self.province_code, 'to_alipay_dict'):
  313. params['province_code'] = self.province_code.to_alipay_dict()
  314. else:
  315. params['province_code'] = self.province_code
  316. if self.shop_branch_name:
  317. if hasattr(self.shop_branch_name, 'to_alipay_dict'):
  318. params['shop_branch_name'] = self.shop_branch_name.to_alipay_dict()
  319. else:
  320. params['shop_branch_name'] = self.shop_branch_name
  321. if self.shop_name:
  322. if hasattr(self.shop_name, 'to_alipay_dict'):
  323. params['shop_name'] = self.shop_name.to_alipay_dict()
  324. else:
  325. params['shop_name'] = self.shop_name
  326. if self.shop_tel:
  327. if hasattr(self.shop_tel, 'to_alipay_dict'):
  328. params['shop_tel'] = self.shop_tel.to_alipay_dict()
  329. else:
  330. params['shop_tel'] = self.shop_tel
  331. if self.shop_type:
  332. if hasattr(self.shop_type, 'to_alipay_dict'):
  333. params['shop_type'] = self.shop_type.to_alipay_dict()
  334. else:
  335. params['shop_type'] = self.shop_type
  336. if self.status:
  337. if hasattr(self.status, 'to_alipay_dict'):
  338. params['status'] = self.status.to_alipay_dict()
  339. else:
  340. params['status'] = self.status
  341. return params
  342. @staticmethod
  343. def from_alipay_dict(d):
  344. if not d:
  345. return None
  346. o = AlipayEcoMycarMaintainShopCreateModel()
  347. if 'address' in d:
  348. o.address = d['address']
  349. if 'alipay_account' in d:
  350. o.alipay_account = d['alipay_account']
  351. if 'brand_ids' in d:
  352. o.brand_ids = d['brand_ids']
  353. if 'city_code' in d:
  354. o.city_code = d['city_code']
  355. if 'close_time' in d:
  356. o.close_time = d['close_time']
  357. if 'contact_email' in d:
  358. o.contact_email = d['contact_email']
  359. if 'contact_mobile_phone' in d:
  360. o.contact_mobile_phone = d['contact_mobile_phone']
  361. if 'contact_name' in d:
  362. o.contact_name = d['contact_name']
  363. if 'district_code' in d:
  364. o.district_code = d['district_code']
  365. if 'ext_param' in d:
  366. o.ext_param = d['ext_param']
  367. if 'industry_app_category_id' in d:
  368. o.industry_app_category_id = d['industry_app_category_id']
  369. if 'industry_category_id' in d:
  370. o.industry_category_id = d['industry_category_id']
  371. if 'lat' in d:
  372. o.lat = d['lat']
  373. if 'lon' in d:
  374. o.lon = d['lon']
  375. if 'main_image' in d:
  376. o.main_image = d['main_image']
  377. if 'merchant_branch_id' in d:
  378. o.merchant_branch_id = d['merchant_branch_id']
  379. if 'open_time' in d:
  380. o.open_time = d['open_time']
  381. if 'other_images' in d:
  382. o.other_images = d['other_images']
  383. if 'out_shop_id' in d:
  384. o.out_shop_id = d['out_shop_id']
  385. if 'province_code' in d:
  386. o.province_code = d['province_code']
  387. if 'shop_branch_name' in d:
  388. o.shop_branch_name = d['shop_branch_name']
  389. if 'shop_name' in d:
  390. o.shop_name = d['shop_name']
  391. if 'shop_tel' in d:
  392. o.shop_tel = d['shop_tel']
  393. if 'shop_type' in d:
  394. o.shop_type = d['shop_type']
  395. if 'status' in d:
  396. o.status = d['status']
  397. return o