AlipayCommerceIotDeviceAudioSyncModel.py 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class AlipayCommerceIotDeviceAudioSyncModel(object):
  6. def __init__(self):
  7. self._biz_tid = None
  8. self._trade_id = None
  9. self._trade_type = None
  10. self._voice_content = None
  11. @property
  12. def biz_tid(self):
  13. return self._biz_tid
  14. @biz_tid.setter
  15. def biz_tid(self, value):
  16. self._biz_tid = value
  17. @property
  18. def trade_id(self):
  19. return self._trade_id
  20. @trade_id.setter
  21. def trade_id(self, value):
  22. self._trade_id = value
  23. @property
  24. def trade_type(self):
  25. return self._trade_type
  26. @trade_type.setter
  27. def trade_type(self, value):
  28. self._trade_type = value
  29. @property
  30. def voice_content(self):
  31. return self._voice_content
  32. @voice_content.setter
  33. def voice_content(self, value):
  34. self._voice_content = value
  35. def to_alipay_dict(self):
  36. params = dict()
  37. if self.biz_tid:
  38. if hasattr(self.biz_tid, 'to_alipay_dict'):
  39. params['biz_tid'] = self.biz_tid.to_alipay_dict()
  40. else:
  41. params['biz_tid'] = self.biz_tid
  42. if self.trade_id:
  43. if hasattr(self.trade_id, 'to_alipay_dict'):
  44. params['trade_id'] = self.trade_id.to_alipay_dict()
  45. else:
  46. params['trade_id'] = self.trade_id
  47. if self.trade_type:
  48. if hasattr(self.trade_type, 'to_alipay_dict'):
  49. params['trade_type'] = self.trade_type.to_alipay_dict()
  50. else:
  51. params['trade_type'] = self.trade_type
  52. if self.voice_content:
  53. if hasattr(self.voice_content, 'to_alipay_dict'):
  54. params['voice_content'] = self.voice_content.to_alipay_dict()
  55. else:
  56. params['voice_content'] = self.voice_content
  57. return params
  58. @staticmethod
  59. def from_alipay_dict(d):
  60. if not d:
  61. return None
  62. o = AlipayCommerceIotDeviceAudioSyncModel()
  63. if 'biz_tid' in d:
  64. o.biz_tid = d['biz_tid']
  65. if 'trade_id' in d:
  66. o.trade_id = d['trade_id']
  67. if 'trade_type' in d:
  68. o.trade_type = d['trade_type']
  69. if 'voice_content' in d:
  70. o.voice_content = d['voice_content']
  71. return o