AlipayEcoMycarDialogonlineAnswerPushModel.py 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class AlipayEcoMycarDialogonlineAnswerPushModel(object):
  6. def __init__(self):
  7. self._answer_content = None
  8. self._answer_id = None
  9. self._answer_logo = None
  10. self._answer_name = None
  11. self._answer_pic = None
  12. self._answer_time = None
  13. self._answer_type = None
  14. self._content_type = None
  15. self._question_id = None
  16. @property
  17. def answer_content(self):
  18. return self._answer_content
  19. @answer_content.setter
  20. def answer_content(self, value):
  21. self._answer_content = value
  22. @property
  23. def answer_id(self):
  24. return self._answer_id
  25. @answer_id.setter
  26. def answer_id(self, value):
  27. self._answer_id = value
  28. @property
  29. def answer_logo(self):
  30. return self._answer_logo
  31. @answer_logo.setter
  32. def answer_logo(self, value):
  33. self._answer_logo = value
  34. @property
  35. def answer_name(self):
  36. return self._answer_name
  37. @answer_name.setter
  38. def answer_name(self, value):
  39. self._answer_name = value
  40. @property
  41. def answer_pic(self):
  42. return self._answer_pic
  43. @answer_pic.setter
  44. def answer_pic(self, value):
  45. self._answer_pic = value
  46. @property
  47. def answer_time(self):
  48. return self._answer_time
  49. @answer_time.setter
  50. def answer_time(self, value):
  51. self._answer_time = value
  52. @property
  53. def answer_type(self):
  54. return self._answer_type
  55. @answer_type.setter
  56. def answer_type(self, value):
  57. self._answer_type = value
  58. @property
  59. def content_type(self):
  60. return self._content_type
  61. @content_type.setter
  62. def content_type(self, value):
  63. self._content_type = value
  64. @property
  65. def question_id(self):
  66. return self._question_id
  67. @question_id.setter
  68. def question_id(self, value):
  69. self._question_id = value
  70. def to_alipay_dict(self):
  71. params = dict()
  72. if self.answer_content:
  73. if hasattr(self.answer_content, 'to_alipay_dict'):
  74. params['answer_content'] = self.answer_content.to_alipay_dict()
  75. else:
  76. params['answer_content'] = self.answer_content
  77. if self.answer_id:
  78. if hasattr(self.answer_id, 'to_alipay_dict'):
  79. params['answer_id'] = self.answer_id.to_alipay_dict()
  80. else:
  81. params['answer_id'] = self.answer_id
  82. if self.answer_logo:
  83. if hasattr(self.answer_logo, 'to_alipay_dict'):
  84. params['answer_logo'] = self.answer_logo.to_alipay_dict()
  85. else:
  86. params['answer_logo'] = self.answer_logo
  87. if self.answer_name:
  88. if hasattr(self.answer_name, 'to_alipay_dict'):
  89. params['answer_name'] = self.answer_name.to_alipay_dict()
  90. else:
  91. params['answer_name'] = self.answer_name
  92. if self.answer_pic:
  93. if hasattr(self.answer_pic, 'to_alipay_dict'):
  94. params['answer_pic'] = self.answer_pic.to_alipay_dict()
  95. else:
  96. params['answer_pic'] = self.answer_pic
  97. if self.answer_time:
  98. if hasattr(self.answer_time, 'to_alipay_dict'):
  99. params['answer_time'] = self.answer_time.to_alipay_dict()
  100. else:
  101. params['answer_time'] = self.answer_time
  102. if self.answer_type:
  103. if hasattr(self.answer_type, 'to_alipay_dict'):
  104. params['answer_type'] = self.answer_type.to_alipay_dict()
  105. else:
  106. params['answer_type'] = self.answer_type
  107. if self.content_type:
  108. if hasattr(self.content_type, 'to_alipay_dict'):
  109. params['content_type'] = self.content_type.to_alipay_dict()
  110. else:
  111. params['content_type'] = self.content_type
  112. if self.question_id:
  113. if hasattr(self.question_id, 'to_alipay_dict'):
  114. params['question_id'] = self.question_id.to_alipay_dict()
  115. else:
  116. params['question_id'] = self.question_id
  117. return params
  118. @staticmethod
  119. def from_alipay_dict(d):
  120. if not d:
  121. return None
  122. o = AlipayEcoMycarDialogonlineAnswerPushModel()
  123. if 'answer_content' in d:
  124. o.answer_content = d['answer_content']
  125. if 'answer_id' in d:
  126. o.answer_id = d['answer_id']
  127. if 'answer_logo' in d:
  128. o.answer_logo = d['answer_logo']
  129. if 'answer_name' in d:
  130. o.answer_name = d['answer_name']
  131. if 'answer_pic' in d:
  132. o.answer_pic = d['answer_pic']
  133. if 'answer_time' in d:
  134. o.answer_time = d['answer_time']
  135. if 'answer_type' in d:
  136. o.answer_type = d['answer_type']
  137. if 'content_type' in d:
  138. o.content_type = d['content_type']
  139. if 'question_id' in d:
  140. o.question_id = d['question_id']
  141. return o