AlipayCommerceLogisticsFaceMatchModel.py 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class AlipayCommerceLogisticsFaceMatchModel(object):
  6. def __init__(self):
  7. self._biz_type = None
  8. self._face_group = None
  9. self._face_image = None
  10. self._face_rectangle = None
  11. self._merchant_code = None
  12. @property
  13. def biz_type(self):
  14. return self._biz_type
  15. @biz_type.setter
  16. def biz_type(self, value):
  17. self._biz_type = value
  18. @property
  19. def face_group(self):
  20. return self._face_group
  21. @face_group.setter
  22. def face_group(self, value):
  23. self._face_group = value
  24. @property
  25. def face_image(self):
  26. return self._face_image
  27. @face_image.setter
  28. def face_image(self, value):
  29. self._face_image = value
  30. @property
  31. def face_rectangle(self):
  32. return self._face_rectangle
  33. @face_rectangle.setter
  34. def face_rectangle(self, value):
  35. self._face_rectangle = value
  36. @property
  37. def merchant_code(self):
  38. return self._merchant_code
  39. @merchant_code.setter
  40. def merchant_code(self, value):
  41. self._merchant_code = value
  42. def to_alipay_dict(self):
  43. params = dict()
  44. if self.biz_type:
  45. if hasattr(self.biz_type, 'to_alipay_dict'):
  46. params['biz_type'] = self.biz_type.to_alipay_dict()
  47. else:
  48. params['biz_type'] = self.biz_type
  49. if self.face_group:
  50. if hasattr(self.face_group, 'to_alipay_dict'):
  51. params['face_group'] = self.face_group.to_alipay_dict()
  52. else:
  53. params['face_group'] = self.face_group
  54. if self.face_image:
  55. if hasattr(self.face_image, 'to_alipay_dict'):
  56. params['face_image'] = self.face_image.to_alipay_dict()
  57. else:
  58. params['face_image'] = self.face_image
  59. if self.face_rectangle:
  60. if hasattr(self.face_rectangle, 'to_alipay_dict'):
  61. params['face_rectangle'] = self.face_rectangle.to_alipay_dict()
  62. else:
  63. params['face_rectangle'] = self.face_rectangle
  64. if self.merchant_code:
  65. if hasattr(self.merchant_code, 'to_alipay_dict'):
  66. params['merchant_code'] = self.merchant_code.to_alipay_dict()
  67. else:
  68. params['merchant_code'] = self.merchant_code
  69. return params
  70. @staticmethod
  71. def from_alipay_dict(d):
  72. if not d:
  73. return None
  74. o = AlipayCommerceLogisticsFaceMatchModel()
  75. if 'biz_type' in d:
  76. o.biz_type = d['biz_type']
  77. if 'face_group' in d:
  78. o.face_group = d['face_group']
  79. if 'face_image' in d:
  80. o.face_image = d['face_image']
  81. if 'face_rectangle' in d:
  82. o.face_rectangle = d['face_rectangle']
  83. if 'merchant_code' in d:
  84. o.merchant_code = d['merchant_code']
  85. return o