AlipaySecurityRiskContentResultGetResponse.py 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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 AlipaySecurityRiskContentResultGetResponse(AlipayResponse):
  7. def __init__(self):
  8. super(AlipaySecurityRiskContentResultGetResponse, self).__init__()
  9. self._hit_detect_items = None
  10. self._result_action = None
  11. @property
  12. def hit_detect_items(self):
  13. return self._hit_detect_items
  14. @hit_detect_items.setter
  15. def hit_detect_items(self, value):
  16. if isinstance(value, list):
  17. self._hit_detect_items = list()
  18. for i in value:
  19. if isinstance(i, InfoSecHitDetectItem):
  20. self._hit_detect_items.append(i)
  21. else:
  22. self._hit_detect_items.append(InfoSecHitDetectItem.from_alipay_dict(i))
  23. @property
  24. def result_action(self):
  25. return self._result_action
  26. @result_action.setter
  27. def result_action(self, value):
  28. self._result_action = value
  29. def parse_response_content(self, response_content):
  30. response = super(AlipaySecurityRiskContentResultGetResponse, self).parse_response_content(response_content)
  31. if 'hit_detect_items' in response:
  32. self.hit_detect_items = response['hit_detect_items']
  33. if 'result_action' in response:
  34. self.result_action = response['result_action']