AlipaySocialAntforestPlantConsultModel.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 AlipaySocialAntforestPlantConsultModel(object):
  6. def __init__(self):
  7. self._account_id = None
  8. self._apply_type = None
  9. self._project_id = None
  10. self._user_id = None
  11. @property
  12. def account_id(self):
  13. return self._account_id
  14. @account_id.setter
  15. def account_id(self, value):
  16. self._account_id = value
  17. @property
  18. def apply_type(self):
  19. return self._apply_type
  20. @apply_type.setter
  21. def apply_type(self, value):
  22. self._apply_type = value
  23. @property
  24. def project_id(self):
  25. return self._project_id
  26. @project_id.setter
  27. def project_id(self, value):
  28. self._project_id = value
  29. @property
  30. def user_id(self):
  31. return self._user_id
  32. @user_id.setter
  33. def user_id(self, value):
  34. self._user_id = value
  35. def to_alipay_dict(self):
  36. params = dict()
  37. if self.account_id:
  38. if hasattr(self.account_id, 'to_alipay_dict'):
  39. params['account_id'] = self.account_id.to_alipay_dict()
  40. else:
  41. params['account_id'] = self.account_id
  42. if self.apply_type:
  43. if hasattr(self.apply_type, 'to_alipay_dict'):
  44. params['apply_type'] = self.apply_type.to_alipay_dict()
  45. else:
  46. params['apply_type'] = self.apply_type
  47. if self.project_id:
  48. if hasattr(self.project_id, 'to_alipay_dict'):
  49. params['project_id'] = self.project_id.to_alipay_dict()
  50. else:
  51. params['project_id'] = self.project_id
  52. if self.user_id:
  53. if hasattr(self.user_id, 'to_alipay_dict'):
  54. params['user_id'] = self.user_id.to_alipay_dict()
  55. else:
  56. params['user_id'] = self.user_id
  57. return params
  58. @staticmethod
  59. def from_alipay_dict(d):
  60. if not d:
  61. return None
  62. o = AlipaySocialAntforestPlantConsultModel()
  63. if 'account_id' in d:
  64. o.account_id = d['account_id']
  65. if 'apply_type' in d:
  66. o.apply_type = d['apply_type']
  67. if 'project_id' in d:
  68. o.project_id = d['project_id']
  69. if 'user_id' in d:
  70. o.user_id = d['user_id']
  71. return o