ZhimaAuthInfoAuthqueryModel.py 2.0 KB

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