KoubeiAdvertCommissionMissionPromoteModel.py 1.8 KB

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