AlipayEcoRenthouseCommonImageUploadModel.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 AlipayEcoRenthouseCommonImageUploadModel(object):
  6. def __init__(self):
  7. self._file_base = None
  8. self._file_type = None
  9. self._is_public = None
  10. @property
  11. def file_base(self):
  12. return self._file_base
  13. @file_base.setter
  14. def file_base(self, value):
  15. self._file_base = value
  16. @property
  17. def file_type(self):
  18. return self._file_type
  19. @file_type.setter
  20. def file_type(self, value):
  21. self._file_type = value
  22. @property
  23. def is_public(self):
  24. return self._is_public
  25. @is_public.setter
  26. def is_public(self, value):
  27. self._is_public = value
  28. def to_alipay_dict(self):
  29. params = dict()
  30. if self.file_base:
  31. if hasattr(self.file_base, 'to_alipay_dict'):
  32. params['file_base'] = self.file_base.to_alipay_dict()
  33. else:
  34. params['file_base'] = self.file_base
  35. if self.file_type:
  36. if hasattr(self.file_type, 'to_alipay_dict'):
  37. params['file_type'] = self.file_type.to_alipay_dict()
  38. else:
  39. params['file_type'] = self.file_type
  40. if self.is_public:
  41. if hasattr(self.is_public, 'to_alipay_dict'):
  42. params['is_public'] = self.is_public.to_alipay_dict()
  43. else:
  44. params['is_public'] = self.is_public
  45. return params
  46. @staticmethod
  47. def from_alipay_dict(d):
  48. if not d:
  49. return None
  50. o = AlipayEcoRenthouseCommonImageUploadModel()
  51. if 'file_base' in d:
  52. o.file_base = d['file_base']
  53. if 'file_type' in d:
  54. o.file_type = d['file_type']
  55. if 'is_public' in d:
  56. o.is_public = d['is_public']
  57. return o