AlipaySecurityRiskContentDetectResponse.py 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.response.AlipayResponse import AlipayResponse
  5. class AlipaySecurityRiskContentDetectResponse(AlipayResponse):
  6. def __init__(self):
  7. super(AlipaySecurityRiskContentDetectResponse, self).__init__()
  8. self._action = None
  9. self._keywords = None
  10. self._unique_id = None
  11. @property
  12. def action(self):
  13. return self._action
  14. @action.setter
  15. def action(self, value):
  16. self._action = value
  17. @property
  18. def keywords(self):
  19. return self._keywords
  20. @keywords.setter
  21. def keywords(self, value):
  22. if isinstance(value, list):
  23. self._keywords = list()
  24. for i in value:
  25. self._keywords.append(i)
  26. @property
  27. def unique_id(self):
  28. return self._unique_id
  29. @unique_id.setter
  30. def unique_id(self, value):
  31. self._unique_id = value
  32. def parse_response_content(self, response_content):
  33. response = super(AlipaySecurityRiskContentDetectResponse, self).parse_response_content(response_content)
  34. if 'action' in response:
  35. self.action = response['action']
  36. if 'keywords' in response:
  37. self.keywords = response['keywords']
  38. if 'unique_id' in response:
  39. self.unique_id = response['unique_id']