AlipaySocialAntforestPlantApplyModel.py 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class AlipaySocialAntforestPlantApplyModel(object):
  6. def __init__(self):
  7. self._account_id = None
  8. self._apply_type = None
  9. self._ext_info = None
  10. self._out_biz_no = None
  11. self._project_id = None
  12. self._user_id = None
  13. @property
  14. def account_id(self):
  15. return self._account_id
  16. @account_id.setter
  17. def account_id(self, value):
  18. self._account_id = value
  19. @property
  20. def apply_type(self):
  21. return self._apply_type
  22. @apply_type.setter
  23. def apply_type(self, value):
  24. self._apply_type = value
  25. @property
  26. def ext_info(self):
  27. return self._ext_info
  28. @ext_info.setter
  29. def ext_info(self, value):
  30. self._ext_info = value
  31. @property
  32. def out_biz_no(self):
  33. return self._out_biz_no
  34. @out_biz_no.setter
  35. def out_biz_no(self, value):
  36. self._out_biz_no = value
  37. @property
  38. def project_id(self):
  39. return self._project_id
  40. @project_id.setter
  41. def project_id(self, value):
  42. self._project_id = value
  43. @property
  44. def user_id(self):
  45. return self._user_id
  46. @user_id.setter
  47. def user_id(self, value):
  48. self._user_id = value
  49. def to_alipay_dict(self):
  50. params = dict()
  51. if self.account_id:
  52. if hasattr(self.account_id, 'to_alipay_dict'):
  53. params['account_id'] = self.account_id.to_alipay_dict()
  54. else:
  55. params['account_id'] = self.account_id
  56. if self.apply_type:
  57. if hasattr(self.apply_type, 'to_alipay_dict'):
  58. params['apply_type'] = self.apply_type.to_alipay_dict()
  59. else:
  60. params['apply_type'] = self.apply_type
  61. if self.ext_info:
  62. if hasattr(self.ext_info, 'to_alipay_dict'):
  63. params['ext_info'] = self.ext_info.to_alipay_dict()
  64. else:
  65. params['ext_info'] = self.ext_info
  66. if self.out_biz_no:
  67. if hasattr(self.out_biz_no, 'to_alipay_dict'):
  68. params['out_biz_no'] = self.out_biz_no.to_alipay_dict()
  69. else:
  70. params['out_biz_no'] = self.out_biz_no
  71. if self.project_id:
  72. if hasattr(self.project_id, 'to_alipay_dict'):
  73. params['project_id'] = self.project_id.to_alipay_dict()
  74. else:
  75. params['project_id'] = self.project_id
  76. if self.user_id:
  77. if hasattr(self.user_id, 'to_alipay_dict'):
  78. params['user_id'] = self.user_id.to_alipay_dict()
  79. else:
  80. params['user_id'] = self.user_id
  81. return params
  82. @staticmethod
  83. def from_alipay_dict(d):
  84. if not d:
  85. return None
  86. o = AlipaySocialAntforestPlantApplyModel()
  87. if 'account_id' in d:
  88. o.account_id = d['account_id']
  89. if 'apply_type' in d:
  90. o.apply_type = d['apply_type']
  91. if 'ext_info' in d:
  92. o.ext_info = d['ext_info']
  93. if 'out_biz_no' in d:
  94. o.out_biz_no = d['out_biz_no']
  95. if 'project_id' in d:
  96. o.project_id = d['project_id']
  97. if 'user_id' in d:
  98. o.user_id = d['user_id']
  99. return o