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