AlipayIserviceCognitiveClassificationFeedbackSyncModel.py 5.3 KB

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