AlipayMarketingSharetokenCreateModel.py 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class AlipayMarketingSharetokenCreateModel(object):
  6. def __init__(self):
  7. self._biz_linked_id = None
  8. self._biz_type = None
  9. self._btn_left = None
  10. self._btn_left_href = None
  11. self._btn_right = None
  12. self._btn_right_href = None
  13. self._desc = None
  14. self._icon = None
  15. self._start_date = None
  16. self._timeout = None
  17. self._title = None
  18. @property
  19. def biz_linked_id(self):
  20. return self._biz_linked_id
  21. @biz_linked_id.setter
  22. def biz_linked_id(self, value):
  23. self._biz_linked_id = value
  24. @property
  25. def biz_type(self):
  26. return self._biz_type
  27. @biz_type.setter
  28. def biz_type(self, value):
  29. self._biz_type = value
  30. @property
  31. def btn_left(self):
  32. return self._btn_left
  33. @btn_left.setter
  34. def btn_left(self, value):
  35. self._btn_left = value
  36. @property
  37. def btn_left_href(self):
  38. return self._btn_left_href
  39. @btn_left_href.setter
  40. def btn_left_href(self, value):
  41. self._btn_left_href = value
  42. @property
  43. def btn_right(self):
  44. return self._btn_right
  45. @btn_right.setter
  46. def btn_right(self, value):
  47. self._btn_right = value
  48. @property
  49. def btn_right_href(self):
  50. return self._btn_right_href
  51. @btn_right_href.setter
  52. def btn_right_href(self, value):
  53. self._btn_right_href = value
  54. @property
  55. def desc(self):
  56. return self._desc
  57. @desc.setter
  58. def desc(self, value):
  59. self._desc = value
  60. @property
  61. def icon(self):
  62. return self._icon
  63. @icon.setter
  64. def icon(self, value):
  65. self._icon = value
  66. @property
  67. def start_date(self):
  68. return self._start_date
  69. @start_date.setter
  70. def start_date(self, value):
  71. self._start_date = value
  72. @property
  73. def timeout(self):
  74. return self._timeout
  75. @timeout.setter
  76. def timeout(self, value):
  77. self._timeout = value
  78. @property
  79. def title(self):
  80. return self._title
  81. @title.setter
  82. def title(self, value):
  83. self._title = value
  84. def to_alipay_dict(self):
  85. params = dict()
  86. if self.biz_linked_id:
  87. if hasattr(self.biz_linked_id, 'to_alipay_dict'):
  88. params['biz_linked_id'] = self.biz_linked_id.to_alipay_dict()
  89. else:
  90. params['biz_linked_id'] = self.biz_linked_id
  91. if self.biz_type:
  92. if hasattr(self.biz_type, 'to_alipay_dict'):
  93. params['biz_type'] = self.biz_type.to_alipay_dict()
  94. else:
  95. params['biz_type'] = self.biz_type
  96. if self.btn_left:
  97. if hasattr(self.btn_left, 'to_alipay_dict'):
  98. params['btn_left'] = self.btn_left.to_alipay_dict()
  99. else:
  100. params['btn_left'] = self.btn_left
  101. if self.btn_left_href:
  102. if hasattr(self.btn_left_href, 'to_alipay_dict'):
  103. params['btn_left_href'] = self.btn_left_href.to_alipay_dict()
  104. else:
  105. params['btn_left_href'] = self.btn_left_href
  106. if self.btn_right:
  107. if hasattr(self.btn_right, 'to_alipay_dict'):
  108. params['btn_right'] = self.btn_right.to_alipay_dict()
  109. else:
  110. params['btn_right'] = self.btn_right
  111. if self.btn_right_href:
  112. if hasattr(self.btn_right_href, 'to_alipay_dict'):
  113. params['btn_right_href'] = self.btn_right_href.to_alipay_dict()
  114. else:
  115. params['btn_right_href'] = self.btn_right_href
  116. if self.desc:
  117. if hasattr(self.desc, 'to_alipay_dict'):
  118. params['desc'] = self.desc.to_alipay_dict()
  119. else:
  120. params['desc'] = self.desc
  121. if self.icon:
  122. if hasattr(self.icon, 'to_alipay_dict'):
  123. params['icon'] = self.icon.to_alipay_dict()
  124. else:
  125. params['icon'] = self.icon
  126. if self.start_date:
  127. if hasattr(self.start_date, 'to_alipay_dict'):
  128. params['start_date'] = self.start_date.to_alipay_dict()
  129. else:
  130. params['start_date'] = self.start_date
  131. if self.timeout:
  132. if hasattr(self.timeout, 'to_alipay_dict'):
  133. params['timeout'] = self.timeout.to_alipay_dict()
  134. else:
  135. params['timeout'] = self.timeout
  136. if self.title:
  137. if hasattr(self.title, 'to_alipay_dict'):
  138. params['title'] = self.title.to_alipay_dict()
  139. else:
  140. params['title'] = self.title
  141. return params
  142. @staticmethod
  143. def from_alipay_dict(d):
  144. if not d:
  145. return None
  146. o = AlipayMarketingSharetokenCreateModel()
  147. if 'biz_linked_id' in d:
  148. o.biz_linked_id = d['biz_linked_id']
  149. if 'biz_type' in d:
  150. o.biz_type = d['biz_type']
  151. if 'btn_left' in d:
  152. o.btn_left = d['btn_left']
  153. if 'btn_left_href' in d:
  154. o.btn_left_href = d['btn_left_href']
  155. if 'btn_right' in d:
  156. o.btn_right = d['btn_right']
  157. if 'btn_right_href' in d:
  158. o.btn_right_href = d['btn_right_href']
  159. if 'desc' in d:
  160. o.desc = d['desc']
  161. if 'icon' in d:
  162. o.icon = d['icon']
  163. if 'start_date' in d:
  164. o.start_date = d['start_date']
  165. if 'timeout' in d:
  166. o.timeout = d['timeout']
  167. if 'title' in d:
  168. o.title = d['title']
  169. return o