KoubeiSecurityRiskEventSendModel.py 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class KoubeiSecurityRiskEventSendModel(object):
  6. def __init__(self):
  7. self._business_info = None
  8. self._gmt_occur = None
  9. self._product = None
  10. self._request_id = None
  11. self._scene_code = None
  12. @property
  13. def business_info(self):
  14. return self._business_info
  15. @business_info.setter
  16. def business_info(self, value):
  17. self._business_info = value
  18. @property
  19. def gmt_occur(self):
  20. return self._gmt_occur
  21. @gmt_occur.setter
  22. def gmt_occur(self, value):
  23. self._gmt_occur = value
  24. @property
  25. def product(self):
  26. return self._product
  27. @product.setter
  28. def product(self, value):
  29. self._product = value
  30. @property
  31. def request_id(self):
  32. return self._request_id
  33. @request_id.setter
  34. def request_id(self, value):
  35. self._request_id = value
  36. @property
  37. def scene_code(self):
  38. return self._scene_code
  39. @scene_code.setter
  40. def scene_code(self, value):
  41. self._scene_code = value
  42. def to_alipay_dict(self):
  43. params = dict()
  44. if self.business_info:
  45. if hasattr(self.business_info, 'to_alipay_dict'):
  46. params['business_info'] = self.business_info.to_alipay_dict()
  47. else:
  48. params['business_info'] = self.business_info
  49. if self.gmt_occur:
  50. if hasattr(self.gmt_occur, 'to_alipay_dict'):
  51. params['gmt_occur'] = self.gmt_occur.to_alipay_dict()
  52. else:
  53. params['gmt_occur'] = self.gmt_occur
  54. if self.product:
  55. if hasattr(self.product, 'to_alipay_dict'):
  56. params['product'] = self.product.to_alipay_dict()
  57. else:
  58. params['product'] = self.product
  59. if self.request_id:
  60. if hasattr(self.request_id, 'to_alipay_dict'):
  61. params['request_id'] = self.request_id.to_alipay_dict()
  62. else:
  63. params['request_id'] = self.request_id
  64. if self.scene_code:
  65. if hasattr(self.scene_code, 'to_alipay_dict'):
  66. params['scene_code'] = self.scene_code.to_alipay_dict()
  67. else:
  68. params['scene_code'] = self.scene_code
  69. return params
  70. @staticmethod
  71. def from_alipay_dict(d):
  72. if not d:
  73. return None
  74. o = KoubeiSecurityRiskEventSendModel()
  75. if 'business_info' in d:
  76. o.business_info = d['business_info']
  77. if 'gmt_occur' in d:
  78. o.gmt_occur = d['gmt_occur']
  79. if 'product' in d:
  80. o.product = d['product']
  81. if 'request_id' in d:
  82. o.request_id = d['request_id']
  83. if 'scene_code' in d:
  84. o.scene_code = d['scene_code']
  85. return o