AntfortuneContentCommunityDataSendModel.py 1.8 KB

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