AlipaySocialBaseContentlibStandardcontentSendModel.py 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class AlipaySocialBaseContentlibStandardcontentSendModel(object):
  6. def __init__(self):
  7. self._action_type = None
  8. self._ext_info = None
  9. self._public_id = None
  10. self._source_author = None
  11. self._source_category = None
  12. self._source_content = None
  13. self._source_cover = None
  14. self._source_id = None
  15. self._source_keywords = None
  16. self._source_link = None
  17. self._source_publish_date = None
  18. self._source_summary = None
  19. self._source_thumbnail_type = None
  20. self._source_thumbnails = None
  21. self._source_title = None
  22. @property
  23. def action_type(self):
  24. return self._action_type
  25. @action_type.setter
  26. def action_type(self, value):
  27. self._action_type = value
  28. @property
  29. def ext_info(self):
  30. return self._ext_info
  31. @ext_info.setter
  32. def ext_info(self, value):
  33. self._ext_info = value
  34. @property
  35. def public_id(self):
  36. return self._public_id
  37. @public_id.setter
  38. def public_id(self, value):
  39. self._public_id = value
  40. @property
  41. def source_author(self):
  42. return self._source_author
  43. @source_author.setter
  44. def source_author(self, value):
  45. self._source_author = value
  46. @property
  47. def source_category(self):
  48. return self._source_category
  49. @source_category.setter
  50. def source_category(self, value):
  51. self._source_category = value
  52. @property
  53. def source_content(self):
  54. return self._source_content
  55. @source_content.setter
  56. def source_content(self, value):
  57. self._source_content = value
  58. @property
  59. def source_cover(self):
  60. return self._source_cover
  61. @source_cover.setter
  62. def source_cover(self, value):
  63. self._source_cover = value
  64. @property
  65. def source_id(self):
  66. return self._source_id
  67. @source_id.setter
  68. def source_id(self, value):
  69. self._source_id = value
  70. @property
  71. def source_keywords(self):
  72. return self._source_keywords
  73. @source_keywords.setter
  74. def source_keywords(self, value):
  75. self._source_keywords = value
  76. @property
  77. def source_link(self):
  78. return self._source_link
  79. @source_link.setter
  80. def source_link(self, value):
  81. self._source_link = value
  82. @property
  83. def source_publish_date(self):
  84. return self._source_publish_date
  85. @source_publish_date.setter
  86. def source_publish_date(self, value):
  87. self._source_publish_date = value
  88. @property
  89. def source_summary(self):
  90. return self._source_summary
  91. @source_summary.setter
  92. def source_summary(self, value):
  93. self._source_summary = value
  94. @property
  95. def source_thumbnail_type(self):
  96. return self._source_thumbnail_type
  97. @source_thumbnail_type.setter
  98. def source_thumbnail_type(self, value):
  99. self._source_thumbnail_type = value
  100. @property
  101. def source_thumbnails(self):
  102. return self._source_thumbnails
  103. @source_thumbnails.setter
  104. def source_thumbnails(self, value):
  105. self._source_thumbnails = value
  106. @property
  107. def source_title(self):
  108. return self._source_title
  109. @source_title.setter
  110. def source_title(self, value):
  111. self._source_title = value
  112. def to_alipay_dict(self):
  113. params = dict()
  114. if self.action_type:
  115. if hasattr(self.action_type, 'to_alipay_dict'):
  116. params['action_type'] = self.action_type.to_alipay_dict()
  117. else:
  118. params['action_type'] = self.action_type
  119. if self.ext_info:
  120. if hasattr(self.ext_info, 'to_alipay_dict'):
  121. params['ext_info'] = self.ext_info.to_alipay_dict()
  122. else:
  123. params['ext_info'] = self.ext_info
  124. if self.public_id:
  125. if hasattr(self.public_id, 'to_alipay_dict'):
  126. params['public_id'] = self.public_id.to_alipay_dict()
  127. else:
  128. params['public_id'] = self.public_id
  129. if self.source_author:
  130. if hasattr(self.source_author, 'to_alipay_dict'):
  131. params['source_author'] = self.source_author.to_alipay_dict()
  132. else:
  133. params['source_author'] = self.source_author
  134. if self.source_category:
  135. if hasattr(self.source_category, 'to_alipay_dict'):
  136. params['source_category'] = self.source_category.to_alipay_dict()
  137. else:
  138. params['source_category'] = self.source_category
  139. if self.source_content:
  140. if hasattr(self.source_content, 'to_alipay_dict'):
  141. params['source_content'] = self.source_content.to_alipay_dict()
  142. else:
  143. params['source_content'] = self.source_content
  144. if self.source_cover:
  145. if hasattr(self.source_cover, 'to_alipay_dict'):
  146. params['source_cover'] = self.source_cover.to_alipay_dict()
  147. else:
  148. params['source_cover'] = self.source_cover
  149. if self.source_id:
  150. if hasattr(self.source_id, 'to_alipay_dict'):
  151. params['source_id'] = self.source_id.to_alipay_dict()
  152. else:
  153. params['source_id'] = self.source_id
  154. if self.source_keywords:
  155. if hasattr(self.source_keywords, 'to_alipay_dict'):
  156. params['source_keywords'] = self.source_keywords.to_alipay_dict()
  157. else:
  158. params['source_keywords'] = self.source_keywords
  159. if self.source_link:
  160. if hasattr(self.source_link, 'to_alipay_dict'):
  161. params['source_link'] = self.source_link.to_alipay_dict()
  162. else:
  163. params['source_link'] = self.source_link
  164. if self.source_publish_date:
  165. if hasattr(self.source_publish_date, 'to_alipay_dict'):
  166. params['source_publish_date'] = self.source_publish_date.to_alipay_dict()
  167. else:
  168. params['source_publish_date'] = self.source_publish_date
  169. if self.source_summary:
  170. if hasattr(self.source_summary, 'to_alipay_dict'):
  171. params['source_summary'] = self.source_summary.to_alipay_dict()
  172. else:
  173. params['source_summary'] = self.source_summary
  174. if self.source_thumbnail_type:
  175. if hasattr(self.source_thumbnail_type, 'to_alipay_dict'):
  176. params['source_thumbnail_type'] = self.source_thumbnail_type.to_alipay_dict()
  177. else:
  178. params['source_thumbnail_type'] = self.source_thumbnail_type
  179. if self.source_thumbnails:
  180. if hasattr(self.source_thumbnails, 'to_alipay_dict'):
  181. params['source_thumbnails'] = self.source_thumbnails.to_alipay_dict()
  182. else:
  183. params['source_thumbnails'] = self.source_thumbnails
  184. if self.source_title:
  185. if hasattr(self.source_title, 'to_alipay_dict'):
  186. params['source_title'] = self.source_title.to_alipay_dict()
  187. else:
  188. params['source_title'] = self.source_title
  189. return params
  190. @staticmethod
  191. def from_alipay_dict(d):
  192. if not d:
  193. return None
  194. o = AlipaySocialBaseContentlibStandardcontentSendModel()
  195. if 'action_type' in d:
  196. o.action_type = d['action_type']
  197. if 'ext_info' in d:
  198. o.ext_info = d['ext_info']
  199. if 'public_id' in d:
  200. o.public_id = d['public_id']
  201. if 'source_author' in d:
  202. o.source_author = d['source_author']
  203. if 'source_category' in d:
  204. o.source_category = d['source_category']
  205. if 'source_content' in d:
  206. o.source_content = d['source_content']
  207. if 'source_cover' in d:
  208. o.source_cover = d['source_cover']
  209. if 'source_id' in d:
  210. o.source_id = d['source_id']
  211. if 'source_keywords' in d:
  212. o.source_keywords = d['source_keywords']
  213. if 'source_link' in d:
  214. o.source_link = d['source_link']
  215. if 'source_publish_date' in d:
  216. o.source_publish_date = d['source_publish_date']
  217. if 'source_summary' in d:
  218. o.source_summary = d['source_summary']
  219. if 'source_thumbnail_type' in d:
  220. o.source_thumbnail_type = d['source_thumbnail_type']
  221. if 'source_thumbnails' in d:
  222. o.source_thumbnails = d['source_thumbnails']
  223. if 'source_title' in d:
  224. o.source_title = d['source_title']
  225. return o