AlipaySecurityRiskContentResultGetModel.py 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class AlipaySecurityRiskContentResultGetModel(object):
  6. def __init__(self):
  7. self._app_scene = None
  8. self._app_scene_data_id = None
  9. self._event_id = None
  10. @property
  11. def app_scene(self):
  12. return self._app_scene
  13. @app_scene.setter
  14. def app_scene(self, value):
  15. self._app_scene = value
  16. @property
  17. def app_scene_data_id(self):
  18. return self._app_scene_data_id
  19. @app_scene_data_id.setter
  20. def app_scene_data_id(self, value):
  21. self._app_scene_data_id = value
  22. @property
  23. def event_id(self):
  24. return self._event_id
  25. @event_id.setter
  26. def event_id(self, value):
  27. self._event_id = value
  28. def to_alipay_dict(self):
  29. params = dict()
  30. if self.app_scene:
  31. if hasattr(self.app_scene, 'to_alipay_dict'):
  32. params['app_scene'] = self.app_scene.to_alipay_dict()
  33. else:
  34. params['app_scene'] = self.app_scene
  35. if self.app_scene_data_id:
  36. if hasattr(self.app_scene_data_id, 'to_alipay_dict'):
  37. params['app_scene_data_id'] = self.app_scene_data_id.to_alipay_dict()
  38. else:
  39. params['app_scene_data_id'] = self.app_scene_data_id
  40. if self.event_id:
  41. if hasattr(self.event_id, 'to_alipay_dict'):
  42. params['event_id'] = self.event_id.to_alipay_dict()
  43. else:
  44. params['event_id'] = self.event_id
  45. return params
  46. @staticmethod
  47. def from_alipay_dict(d):
  48. if not d:
  49. return None
  50. o = AlipaySecurityRiskContentResultGetModel()
  51. if 'app_scene' in d:
  52. o.app_scene = d['app_scene']
  53. if 'app_scene_data_id' in d:
  54. o.app_scene_data_id = d['app_scene_data_id']
  55. if 'event_id' in d:
  56. o.event_id = d['event_id']
  57. return o