AftAifinFireeyeOcrImageQueryModel.py 1.9 KB

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