AlipayCommerceIotGroupCreateModel.py 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class AlipayCommerceIotGroupCreateModel(object):
  6. def __init__(self):
  7. self._biz_type = None
  8. self._description = None
  9. self._group_name = None
  10. @property
  11. def biz_type(self):
  12. return self._biz_type
  13. @biz_type.setter
  14. def biz_type(self, value):
  15. self._biz_type = value
  16. @property
  17. def description(self):
  18. return self._description
  19. @description.setter
  20. def description(self, value):
  21. self._description = value
  22. @property
  23. def group_name(self):
  24. return self._group_name
  25. @group_name.setter
  26. def group_name(self, value):
  27. self._group_name = value
  28. def to_alipay_dict(self):
  29. params = dict()
  30. if self.biz_type:
  31. if hasattr(self.biz_type, 'to_alipay_dict'):
  32. params['biz_type'] = self.biz_type.to_alipay_dict()
  33. else:
  34. params['biz_type'] = self.biz_type
  35. if self.description:
  36. if hasattr(self.description, 'to_alipay_dict'):
  37. params['description'] = self.description.to_alipay_dict()
  38. else:
  39. params['description'] = self.description
  40. if self.group_name:
  41. if hasattr(self.group_name, 'to_alipay_dict'):
  42. params['group_name'] = self.group_name.to_alipay_dict()
  43. else:
  44. params['group_name'] = self.group_name
  45. return params
  46. @staticmethod
  47. def from_alipay_dict(d):
  48. if not d:
  49. return None
  50. o = AlipayCommerceIotGroupCreateModel()
  51. if 'biz_type' in d:
  52. o.biz_type = d['biz_type']
  53. if 'description' in d:
  54. o.description = d['description']
  55. if 'group_name' in d:
  56. o.group_name = d['group_name']
  57. return o