AlipayUserAntarchiveFaceUploadModel.py 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. from alipay.aop.api.domain.ArchiveFaceExtInfo import ArchiveFaceExtInfo
  6. class AlipayUserAntarchiveFaceUploadModel(object):
  7. def __init__(self):
  8. self._biz_scene = None
  9. self._cert_name = None
  10. self._cert_no = None
  11. self._cert_type = None
  12. self._ext_info = None
  13. self._other_portrait_url = None
  14. self._portrait_url = None
  15. @property
  16. def biz_scene(self):
  17. return self._biz_scene
  18. @biz_scene.setter
  19. def biz_scene(self, value):
  20. self._biz_scene = value
  21. @property
  22. def cert_name(self):
  23. return self._cert_name
  24. @cert_name.setter
  25. def cert_name(self, value):
  26. self._cert_name = value
  27. @property
  28. def cert_no(self):
  29. return self._cert_no
  30. @cert_no.setter
  31. def cert_no(self, value):
  32. self._cert_no = value
  33. @property
  34. def cert_type(self):
  35. return self._cert_type
  36. @cert_type.setter
  37. def cert_type(self, value):
  38. self._cert_type = value
  39. @property
  40. def ext_info(self):
  41. return self._ext_info
  42. @ext_info.setter
  43. def ext_info(self, value):
  44. if isinstance(value, ArchiveFaceExtInfo):
  45. self._ext_info = value
  46. else:
  47. self._ext_info = ArchiveFaceExtInfo.from_alipay_dict(value)
  48. @property
  49. def other_portrait_url(self):
  50. return self._other_portrait_url
  51. @other_portrait_url.setter
  52. def other_portrait_url(self, value):
  53. self._other_portrait_url = value
  54. @property
  55. def portrait_url(self):
  56. return self._portrait_url
  57. @portrait_url.setter
  58. def portrait_url(self, value):
  59. self._portrait_url = value
  60. def to_alipay_dict(self):
  61. params = dict()
  62. if self.biz_scene:
  63. if hasattr(self.biz_scene, 'to_alipay_dict'):
  64. params['biz_scene'] = self.biz_scene.to_alipay_dict()
  65. else:
  66. params['biz_scene'] = self.biz_scene
  67. if self.cert_name:
  68. if hasattr(self.cert_name, 'to_alipay_dict'):
  69. params['cert_name'] = self.cert_name.to_alipay_dict()
  70. else:
  71. params['cert_name'] = self.cert_name
  72. if self.cert_no:
  73. if hasattr(self.cert_no, 'to_alipay_dict'):
  74. params['cert_no'] = self.cert_no.to_alipay_dict()
  75. else:
  76. params['cert_no'] = self.cert_no
  77. if self.cert_type:
  78. if hasattr(self.cert_type, 'to_alipay_dict'):
  79. params['cert_type'] = self.cert_type.to_alipay_dict()
  80. else:
  81. params['cert_type'] = self.cert_type
  82. if self.ext_info:
  83. if hasattr(self.ext_info, 'to_alipay_dict'):
  84. params['ext_info'] = self.ext_info.to_alipay_dict()
  85. else:
  86. params['ext_info'] = self.ext_info
  87. if self.other_portrait_url:
  88. if hasattr(self.other_portrait_url, 'to_alipay_dict'):
  89. params['other_portrait_url'] = self.other_portrait_url.to_alipay_dict()
  90. else:
  91. params['other_portrait_url'] = self.other_portrait_url
  92. if self.portrait_url:
  93. if hasattr(self.portrait_url, 'to_alipay_dict'):
  94. params['portrait_url'] = self.portrait_url.to_alipay_dict()
  95. else:
  96. params['portrait_url'] = self.portrait_url
  97. return params
  98. @staticmethod
  99. def from_alipay_dict(d):
  100. if not d:
  101. return None
  102. o = AlipayUserAntarchiveFaceUploadModel()
  103. if 'biz_scene' in d:
  104. o.biz_scene = d['biz_scene']
  105. if 'cert_name' in d:
  106. o.cert_name = d['cert_name']
  107. if 'cert_no' in d:
  108. o.cert_no = d['cert_no']
  109. if 'cert_type' in d:
  110. o.cert_type = d['cert_type']
  111. if 'ext_info' in d:
  112. o.ext_info = d['ext_info']
  113. if 'other_portrait_url' in d:
  114. o.other_portrait_url = d['other_portrait_url']
  115. if 'portrait_url' in d:
  116. o.portrait_url = d['portrait_url']
  117. return o