AlipayInsDataAutoFraudQueryModel.py 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. from alipay.aop.api.domain.Informant import Informant
  6. from alipay.aop.api.domain.Injured import Injured
  7. from alipay.aop.api.domain.Insured import Insured
  8. from alipay.aop.api.domain.ReportCar import ReportCar
  9. from alipay.aop.api.domain.ReportCar import ReportCar
  10. class AlipayInsDataAutoFraudQueryModel(object):
  11. def __init__(self):
  12. self._accident_city = None
  13. self._accident_date = None
  14. self._accident_location = None
  15. self._case_amount = None
  16. self._estimate_damage_amount = None
  17. self._informant = None
  18. self._injured_count = None
  19. self._injured_list = None
  20. self._insure_city = None
  21. self._insured = None
  22. self._policy_no = None
  23. self._report_date = None
  24. self._report_no = None
  25. self._request_no = None
  26. self._scene_type = None
  27. self._subject_car = None
  28. self._third_party_car_count = None
  29. self._third_party_car_list = None
  30. @property
  31. def accident_city(self):
  32. return self._accident_city
  33. @accident_city.setter
  34. def accident_city(self, value):
  35. self._accident_city = value
  36. @property
  37. def accident_date(self):
  38. return self._accident_date
  39. @accident_date.setter
  40. def accident_date(self, value):
  41. self._accident_date = value
  42. @property
  43. def accident_location(self):
  44. return self._accident_location
  45. @accident_location.setter
  46. def accident_location(self, value):
  47. self._accident_location = value
  48. @property
  49. def case_amount(self):
  50. return self._case_amount
  51. @case_amount.setter
  52. def case_amount(self, value):
  53. self._case_amount = value
  54. @property
  55. def estimate_damage_amount(self):
  56. return self._estimate_damage_amount
  57. @estimate_damage_amount.setter
  58. def estimate_damage_amount(self, value):
  59. self._estimate_damage_amount = value
  60. @property
  61. def informant(self):
  62. return self._informant
  63. @informant.setter
  64. def informant(self, value):
  65. if isinstance(value, Informant):
  66. self._informant = value
  67. else:
  68. self._informant = Informant.from_alipay_dict(value)
  69. @property
  70. def injured_count(self):
  71. return self._injured_count
  72. @injured_count.setter
  73. def injured_count(self, value):
  74. self._injured_count = value
  75. @property
  76. def injured_list(self):
  77. return self._injured_list
  78. @injured_list.setter
  79. def injured_list(self, value):
  80. if isinstance(value, list):
  81. self._injured_list = list()
  82. for i in value:
  83. if isinstance(i, Injured):
  84. self._injured_list.append(i)
  85. else:
  86. self._injured_list.append(Injured.from_alipay_dict(i))
  87. @property
  88. def insure_city(self):
  89. return self._insure_city
  90. @insure_city.setter
  91. def insure_city(self, value):
  92. self._insure_city = value
  93. @property
  94. def insured(self):
  95. return self._insured
  96. @insured.setter
  97. def insured(self, value):
  98. if isinstance(value, Insured):
  99. self._insured = value
  100. else:
  101. self._insured = Insured.from_alipay_dict(value)
  102. @property
  103. def policy_no(self):
  104. return self._policy_no
  105. @policy_no.setter
  106. def policy_no(self, value):
  107. self._policy_no = value
  108. @property
  109. def report_date(self):
  110. return self._report_date
  111. @report_date.setter
  112. def report_date(self, value):
  113. self._report_date = value
  114. @property
  115. def report_no(self):
  116. return self._report_no
  117. @report_no.setter
  118. def report_no(self, value):
  119. self._report_no = value
  120. @property
  121. def request_no(self):
  122. return self._request_no
  123. @request_no.setter
  124. def request_no(self, value):
  125. self._request_no = value
  126. @property
  127. def scene_type(self):
  128. return self._scene_type
  129. @scene_type.setter
  130. def scene_type(self, value):
  131. self._scene_type = value
  132. @property
  133. def subject_car(self):
  134. return self._subject_car
  135. @subject_car.setter
  136. def subject_car(self, value):
  137. if isinstance(value, ReportCar):
  138. self._subject_car = value
  139. else:
  140. self._subject_car = ReportCar.from_alipay_dict(value)
  141. @property
  142. def third_party_car_count(self):
  143. return self._third_party_car_count
  144. @third_party_car_count.setter
  145. def third_party_car_count(self, value):
  146. self._third_party_car_count = value
  147. @property
  148. def third_party_car_list(self):
  149. return self._third_party_car_list
  150. @third_party_car_list.setter
  151. def third_party_car_list(self, value):
  152. if isinstance(value, list):
  153. self._third_party_car_list = list()
  154. for i in value:
  155. if isinstance(i, ReportCar):
  156. self._third_party_car_list.append(i)
  157. else:
  158. self._third_party_car_list.append(ReportCar.from_alipay_dict(i))
  159. def to_alipay_dict(self):
  160. params = dict()
  161. if self.accident_city:
  162. if hasattr(self.accident_city, 'to_alipay_dict'):
  163. params['accident_city'] = self.accident_city.to_alipay_dict()
  164. else:
  165. params['accident_city'] = self.accident_city
  166. if self.accident_date:
  167. if hasattr(self.accident_date, 'to_alipay_dict'):
  168. params['accident_date'] = self.accident_date.to_alipay_dict()
  169. else:
  170. params['accident_date'] = self.accident_date
  171. if self.accident_location:
  172. if hasattr(self.accident_location, 'to_alipay_dict'):
  173. params['accident_location'] = self.accident_location.to_alipay_dict()
  174. else:
  175. params['accident_location'] = self.accident_location
  176. if self.case_amount:
  177. if hasattr(self.case_amount, 'to_alipay_dict'):
  178. params['case_amount'] = self.case_amount.to_alipay_dict()
  179. else:
  180. params['case_amount'] = self.case_amount
  181. if self.estimate_damage_amount:
  182. if hasattr(self.estimate_damage_amount, 'to_alipay_dict'):
  183. params['estimate_damage_amount'] = self.estimate_damage_amount.to_alipay_dict()
  184. else:
  185. params['estimate_damage_amount'] = self.estimate_damage_amount
  186. if self.informant:
  187. if hasattr(self.informant, 'to_alipay_dict'):
  188. params['informant'] = self.informant.to_alipay_dict()
  189. else:
  190. params['informant'] = self.informant
  191. if self.injured_count:
  192. if hasattr(self.injured_count, 'to_alipay_dict'):
  193. params['injured_count'] = self.injured_count.to_alipay_dict()
  194. else:
  195. params['injured_count'] = self.injured_count
  196. if self.injured_list:
  197. if isinstance(self.injured_list, list):
  198. for i in range(0, len(self.injured_list)):
  199. element = self.injured_list[i]
  200. if hasattr(element, 'to_alipay_dict'):
  201. self.injured_list[i] = element.to_alipay_dict()
  202. if hasattr(self.injured_list, 'to_alipay_dict'):
  203. params['injured_list'] = self.injured_list.to_alipay_dict()
  204. else:
  205. params['injured_list'] = self.injured_list
  206. if self.insure_city:
  207. if hasattr(self.insure_city, 'to_alipay_dict'):
  208. params['insure_city'] = self.insure_city.to_alipay_dict()
  209. else:
  210. params['insure_city'] = self.insure_city
  211. if self.insured:
  212. if hasattr(self.insured, 'to_alipay_dict'):
  213. params['insured'] = self.insured.to_alipay_dict()
  214. else:
  215. params['insured'] = self.insured
  216. if self.policy_no:
  217. if hasattr(self.policy_no, 'to_alipay_dict'):
  218. params['policy_no'] = self.policy_no.to_alipay_dict()
  219. else:
  220. params['policy_no'] = self.policy_no
  221. if self.report_date:
  222. if hasattr(self.report_date, 'to_alipay_dict'):
  223. params['report_date'] = self.report_date.to_alipay_dict()
  224. else:
  225. params['report_date'] = self.report_date
  226. if self.report_no:
  227. if hasattr(self.report_no, 'to_alipay_dict'):
  228. params['report_no'] = self.report_no.to_alipay_dict()
  229. else:
  230. params['report_no'] = self.report_no
  231. if self.request_no:
  232. if hasattr(self.request_no, 'to_alipay_dict'):
  233. params['request_no'] = self.request_no.to_alipay_dict()
  234. else:
  235. params['request_no'] = self.request_no
  236. if self.scene_type:
  237. if hasattr(self.scene_type, 'to_alipay_dict'):
  238. params['scene_type'] = self.scene_type.to_alipay_dict()
  239. else:
  240. params['scene_type'] = self.scene_type
  241. if self.subject_car:
  242. if hasattr(self.subject_car, 'to_alipay_dict'):
  243. params['subject_car'] = self.subject_car.to_alipay_dict()
  244. else:
  245. params['subject_car'] = self.subject_car
  246. if self.third_party_car_count:
  247. if hasattr(self.third_party_car_count, 'to_alipay_dict'):
  248. params['third_party_car_count'] = self.third_party_car_count.to_alipay_dict()
  249. else:
  250. params['third_party_car_count'] = self.third_party_car_count
  251. if self.third_party_car_list:
  252. if isinstance(self.third_party_car_list, list):
  253. for i in range(0, len(self.third_party_car_list)):
  254. element = self.third_party_car_list[i]
  255. if hasattr(element, 'to_alipay_dict'):
  256. self.third_party_car_list[i] = element.to_alipay_dict()
  257. if hasattr(self.third_party_car_list, 'to_alipay_dict'):
  258. params['third_party_car_list'] = self.third_party_car_list.to_alipay_dict()
  259. else:
  260. params['third_party_car_list'] = self.third_party_car_list
  261. return params
  262. @staticmethod
  263. def from_alipay_dict(d):
  264. if not d:
  265. return None
  266. o = AlipayInsDataAutoFraudQueryModel()
  267. if 'accident_city' in d:
  268. o.accident_city = d['accident_city']
  269. if 'accident_date' in d:
  270. o.accident_date = d['accident_date']
  271. if 'accident_location' in d:
  272. o.accident_location = d['accident_location']
  273. if 'case_amount' in d:
  274. o.case_amount = d['case_amount']
  275. if 'estimate_damage_amount' in d:
  276. o.estimate_damage_amount = d['estimate_damage_amount']
  277. if 'informant' in d:
  278. o.informant = d['informant']
  279. if 'injured_count' in d:
  280. o.injured_count = d['injured_count']
  281. if 'injured_list' in d:
  282. o.injured_list = d['injured_list']
  283. if 'insure_city' in d:
  284. o.insure_city = d['insure_city']
  285. if 'insured' in d:
  286. o.insured = d['insured']
  287. if 'policy_no' in d:
  288. o.policy_no = d['policy_no']
  289. if 'report_date' in d:
  290. o.report_date = d['report_date']
  291. if 'report_no' in d:
  292. o.report_no = d['report_no']
  293. if 'request_no' in d:
  294. o.request_no = d['request_no']
  295. if 'scene_type' in d:
  296. o.scene_type = d['scene_type']
  297. if 'subject_car' in d:
  298. o.subject_car = d['subject_car']
  299. if 'third_party_car_count' in d:
  300. o.third_party_car_count = d['third_party_car_count']
  301. if 'third_party_car_list' in d:
  302. o.third_party_car_list = d['third_party_car_list']
  303. return o