AlipayCommerceIotSdarttoolMessageSendModel.py 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class AlipayCommerceIotSdarttoolMessageSendModel(object):
  6. def __init__(self):
  7. self._bi_da = None
  8. self._device_query_type = None
  9. self._immediate_msg = None
  10. self._item_id = None
  11. self._msg_content = None
  12. self._msg_content_type = None
  13. self._msg_expire = None
  14. self._msg_priority = None
  15. self._msg_type = None
  16. self._service_id = None
  17. self._sn = None
  18. self._supplier_id = None
  19. @property
  20. def bi_da(self):
  21. return self._bi_da
  22. @bi_da.setter
  23. def bi_da(self, value):
  24. self._bi_da = value
  25. @property
  26. def device_query_type(self):
  27. return self._device_query_type
  28. @device_query_type.setter
  29. def device_query_type(self, value):
  30. self._device_query_type = value
  31. @property
  32. def immediate_msg(self):
  33. return self._immediate_msg
  34. @immediate_msg.setter
  35. def immediate_msg(self, value):
  36. self._immediate_msg = value
  37. @property
  38. def item_id(self):
  39. return self._item_id
  40. @item_id.setter
  41. def item_id(self, value):
  42. self._item_id = value
  43. @property
  44. def msg_content(self):
  45. return self._msg_content
  46. @msg_content.setter
  47. def msg_content(self, value):
  48. self._msg_content = value
  49. @property
  50. def msg_content_type(self):
  51. return self._msg_content_type
  52. @msg_content_type.setter
  53. def msg_content_type(self, value):
  54. self._msg_content_type = value
  55. @property
  56. def msg_expire(self):
  57. return self._msg_expire
  58. @msg_expire.setter
  59. def msg_expire(self, value):
  60. self._msg_expire = value
  61. @property
  62. def msg_priority(self):
  63. return self._msg_priority
  64. @msg_priority.setter
  65. def msg_priority(self, value):
  66. self._msg_priority = value
  67. @property
  68. def msg_type(self):
  69. return self._msg_type
  70. @msg_type.setter
  71. def msg_type(self, value):
  72. self._msg_type = value
  73. @property
  74. def service_id(self):
  75. return self._service_id
  76. @service_id.setter
  77. def service_id(self, value):
  78. self._service_id = value
  79. @property
  80. def sn(self):
  81. return self._sn
  82. @sn.setter
  83. def sn(self, value):
  84. self._sn = value
  85. @property
  86. def supplier_id(self):
  87. return self._supplier_id
  88. @supplier_id.setter
  89. def supplier_id(self, value):
  90. self._supplier_id = value
  91. def to_alipay_dict(self):
  92. params = dict()
  93. if self.bi_da:
  94. if hasattr(self.bi_da, 'to_alipay_dict'):
  95. params['bi_da'] = self.bi_da.to_alipay_dict()
  96. else:
  97. params['bi_da'] = self.bi_da
  98. if self.device_query_type:
  99. if hasattr(self.device_query_type, 'to_alipay_dict'):
  100. params['device_query_type'] = self.device_query_type.to_alipay_dict()
  101. else:
  102. params['device_query_type'] = self.device_query_type
  103. if self.immediate_msg:
  104. if hasattr(self.immediate_msg, 'to_alipay_dict'):
  105. params['immediate_msg'] = self.immediate_msg.to_alipay_dict()
  106. else:
  107. params['immediate_msg'] = self.immediate_msg
  108. if self.item_id:
  109. if hasattr(self.item_id, 'to_alipay_dict'):
  110. params['item_id'] = self.item_id.to_alipay_dict()
  111. else:
  112. params['item_id'] = self.item_id
  113. if self.msg_content:
  114. if hasattr(self.msg_content, 'to_alipay_dict'):
  115. params['msg_content'] = self.msg_content.to_alipay_dict()
  116. else:
  117. params['msg_content'] = self.msg_content
  118. if self.msg_content_type:
  119. if hasattr(self.msg_content_type, 'to_alipay_dict'):
  120. params['msg_content_type'] = self.msg_content_type.to_alipay_dict()
  121. else:
  122. params['msg_content_type'] = self.msg_content_type
  123. if self.msg_expire:
  124. if hasattr(self.msg_expire, 'to_alipay_dict'):
  125. params['msg_expire'] = self.msg_expire.to_alipay_dict()
  126. else:
  127. params['msg_expire'] = self.msg_expire
  128. if self.msg_priority:
  129. if hasattr(self.msg_priority, 'to_alipay_dict'):
  130. params['msg_priority'] = self.msg_priority.to_alipay_dict()
  131. else:
  132. params['msg_priority'] = self.msg_priority
  133. if self.msg_type:
  134. if hasattr(self.msg_type, 'to_alipay_dict'):
  135. params['msg_type'] = self.msg_type.to_alipay_dict()
  136. else:
  137. params['msg_type'] = self.msg_type
  138. if self.service_id:
  139. if hasattr(self.service_id, 'to_alipay_dict'):
  140. params['service_id'] = self.service_id.to_alipay_dict()
  141. else:
  142. params['service_id'] = self.service_id
  143. if self.sn:
  144. if hasattr(self.sn, 'to_alipay_dict'):
  145. params['sn'] = self.sn.to_alipay_dict()
  146. else:
  147. params['sn'] = self.sn
  148. if self.supplier_id:
  149. if hasattr(self.supplier_id, 'to_alipay_dict'):
  150. params['supplier_id'] = self.supplier_id.to_alipay_dict()
  151. else:
  152. params['supplier_id'] = self.supplier_id
  153. return params
  154. @staticmethod
  155. def from_alipay_dict(d):
  156. if not d:
  157. return None
  158. o = AlipayCommerceIotSdarttoolMessageSendModel()
  159. if 'bi_da' in d:
  160. o.bi_da = d['bi_da']
  161. if 'device_query_type' in d:
  162. o.device_query_type = d['device_query_type']
  163. if 'immediate_msg' in d:
  164. o.immediate_msg = d['immediate_msg']
  165. if 'item_id' in d:
  166. o.item_id = d['item_id']
  167. if 'msg_content' in d:
  168. o.msg_content = d['msg_content']
  169. if 'msg_content_type' in d:
  170. o.msg_content_type = d['msg_content_type']
  171. if 'msg_expire' in d:
  172. o.msg_expire = d['msg_expire']
  173. if 'msg_priority' in d:
  174. o.msg_priority = d['msg_priority']
  175. if 'msg_type' in d:
  176. o.msg_type = d['msg_type']
  177. if 'service_id' in d:
  178. o.service_id = d['service_id']
  179. if 'sn' in d:
  180. o.sn = d['sn']
  181. if 'supplier_id' in d:
  182. o.supplier_id = d['supplier_id']
  183. return o