AlipayOpenAppPropertyMessageSendModel.py 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class AlipayOpenAppPropertyMessageSendModel(object):
  6. def __init__(self):
  7. self._biz_id = None
  8. self._community = None
  9. self._content = None
  10. self._date = None
  11. self._title = None
  12. self._type = None
  13. self._uid = None
  14. self._url = None
  15. @property
  16. def biz_id(self):
  17. return self._biz_id
  18. @biz_id.setter
  19. def biz_id(self, value):
  20. self._biz_id = value
  21. @property
  22. def community(self):
  23. return self._community
  24. @community.setter
  25. def community(self, value):
  26. self._community = value
  27. @property
  28. def content(self):
  29. return self._content
  30. @content.setter
  31. def content(self, value):
  32. self._content = value
  33. @property
  34. def date(self):
  35. return self._date
  36. @date.setter
  37. def date(self, value):
  38. self._date = value
  39. @property
  40. def title(self):
  41. return self._title
  42. @title.setter
  43. def title(self, value):
  44. self._title = value
  45. @property
  46. def type(self):
  47. return self._type
  48. @type.setter
  49. def type(self, value):
  50. self._type = value
  51. @property
  52. def uid(self):
  53. return self._uid
  54. @uid.setter
  55. def uid(self, value):
  56. self._uid = value
  57. @property
  58. def url(self):
  59. return self._url
  60. @url.setter
  61. def url(self, value):
  62. self._url = value
  63. def to_alipay_dict(self):
  64. params = dict()
  65. if self.biz_id:
  66. if hasattr(self.biz_id, 'to_alipay_dict'):
  67. params['biz_id'] = self.biz_id.to_alipay_dict()
  68. else:
  69. params['biz_id'] = self.biz_id
  70. if self.community:
  71. if hasattr(self.community, 'to_alipay_dict'):
  72. params['community'] = self.community.to_alipay_dict()
  73. else:
  74. params['community'] = self.community
  75. if self.content:
  76. if hasattr(self.content, 'to_alipay_dict'):
  77. params['content'] = self.content.to_alipay_dict()
  78. else:
  79. params['content'] = self.content
  80. if self.date:
  81. if hasattr(self.date, 'to_alipay_dict'):
  82. params['date'] = self.date.to_alipay_dict()
  83. else:
  84. params['date'] = self.date
  85. if self.title:
  86. if hasattr(self.title, 'to_alipay_dict'):
  87. params['title'] = self.title.to_alipay_dict()
  88. else:
  89. params['title'] = self.title
  90. if self.type:
  91. if hasattr(self.type, 'to_alipay_dict'):
  92. params['type'] = self.type.to_alipay_dict()
  93. else:
  94. params['type'] = self.type
  95. if self.uid:
  96. if hasattr(self.uid, 'to_alipay_dict'):
  97. params['uid'] = self.uid.to_alipay_dict()
  98. else:
  99. params['uid'] = self.uid
  100. if self.url:
  101. if hasattr(self.url, 'to_alipay_dict'):
  102. params['url'] = self.url.to_alipay_dict()
  103. else:
  104. params['url'] = self.url
  105. return params
  106. @staticmethod
  107. def from_alipay_dict(d):
  108. if not d:
  109. return None
  110. o = AlipayOpenAppPropertyMessageSendModel()
  111. if 'biz_id' in d:
  112. o.biz_id = d['biz_id']
  113. if 'community' in d:
  114. o.community = d['community']
  115. if 'content' in d:
  116. o.content = d['content']
  117. if 'date' in d:
  118. o.date = d['date']
  119. if 'title' in d:
  120. o.title = d['title']
  121. if 'type' in d:
  122. o.type = d['type']
  123. if 'uid' in d:
  124. o.uid = d['uid']
  125. if 'url' in d:
  126. o.url = d['url']
  127. return o