AlipaySecurityRiskContentAnalyzeResponse.py 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.response.AlipayResponse import AlipayResponse
  5. from alipay.aop.api.domain.InfoSecHitDetectItem import InfoSecHitDetectItem
  6. class AlipaySecurityRiskContentAnalyzeResponse(AlipayResponse):
  7. def __init__(self):
  8. super(AlipaySecurityRiskContentAnalyzeResponse, self).__init__()
  9. self._app_scene_data_id = None
  10. self._event_id = None
  11. self._hit_detect_items = None
  12. self._need_query = None
  13. self._result_action = None
  14. @property
  15. def app_scene_data_id(self):
  16. return self._app_scene_data_id
  17. @app_scene_data_id.setter
  18. def app_scene_data_id(self, value):
  19. self._app_scene_data_id = value
  20. @property
  21. def event_id(self):
  22. return self._event_id
  23. @event_id.setter
  24. def event_id(self, value):
  25. self._event_id = value
  26. @property
  27. def hit_detect_items(self):
  28. return self._hit_detect_items
  29. @hit_detect_items.setter
  30. def hit_detect_items(self, value):
  31. if isinstance(value, list):
  32. self._hit_detect_items = list()
  33. for i in value:
  34. if isinstance(i, InfoSecHitDetectItem):
  35. self._hit_detect_items.append(i)
  36. else:
  37. self._hit_detect_items.append(InfoSecHitDetectItem.from_alipay_dict(i))
  38. @property
  39. def need_query(self):
  40. return self._need_query
  41. @need_query.setter
  42. def need_query(self, value):
  43. self._need_query = value
  44. @property
  45. def result_action(self):
  46. return self._result_action
  47. @result_action.setter
  48. def result_action(self, value):
  49. self._result_action = value
  50. def parse_response_content(self, response_content):
  51. response = super(AlipaySecurityRiskContentAnalyzeResponse, self).parse_response_content(response_content)
  52. if 'app_scene_data_id' in response:
  53. self.app_scene_data_id = response['app_scene_data_id']
  54. if 'event_id' in response:
  55. self.event_id = response['event_id']
  56. if 'hit_detect_items' in response:
  57. self.hit_detect_items = response['hit_detect_items']
  58. if 'need_query' in response:
  59. self.need_query = response['need_query']
  60. if 'result_action' in response:
  61. self.result_action = response['result_action']