AlipayInsDataDsbRequestImageInfo.py 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class AlipayInsDataDsbRequestImageInfo(object):
  6. def __init__(self):
  7. self._image_name = None
  8. self._image_path = None
  9. @property
  10. def image_name(self):
  11. return self._image_name
  12. @image_name.setter
  13. def image_name(self, value):
  14. self._image_name = value
  15. @property
  16. def image_path(self):
  17. return self._image_path
  18. @image_path.setter
  19. def image_path(self, value):
  20. self._image_path = value
  21. def to_alipay_dict(self):
  22. params = dict()
  23. if self.image_name:
  24. if hasattr(self.image_name, 'to_alipay_dict'):
  25. params['image_name'] = self.image_name.to_alipay_dict()
  26. else:
  27. params['image_name'] = self.image_name
  28. if self.image_path:
  29. if hasattr(self.image_path, 'to_alipay_dict'):
  30. params['image_path'] = self.image_path.to_alipay_dict()
  31. else:
  32. params['image_path'] = self.image_path
  33. return params
  34. @staticmethod
  35. def from_alipay_dict(d):
  36. if not d:
  37. return None
  38. o = AlipayInsDataDsbRequestImageInfo()
  39. if 'image_name' in d:
  40. o.image_name = d['image_name']
  41. if 'image_path' in d:
  42. o.image_path = d['image_path']
  43. return o