AlipaySecurityProdFingerprintRiskcontrolQueryModel.py 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class AlipaySecurityProdFingerprintRiskcontrolQueryModel(object):
  6. def __init__(self):
  7. self._aaid = None
  8. self._auth_type = None
  9. self._build_model = None
  10. self._device_id = None
  11. @property
  12. def aaid(self):
  13. return self._aaid
  14. @aaid.setter
  15. def aaid(self, value):
  16. self._aaid = value
  17. @property
  18. def auth_type(self):
  19. return self._auth_type
  20. @auth_type.setter
  21. def auth_type(self, value):
  22. self._auth_type = value
  23. @property
  24. def build_model(self):
  25. return self._build_model
  26. @build_model.setter
  27. def build_model(self, value):
  28. self._build_model = value
  29. @property
  30. def device_id(self):
  31. return self._device_id
  32. @device_id.setter
  33. def device_id(self, value):
  34. self._device_id = value
  35. def to_alipay_dict(self):
  36. params = dict()
  37. if self.aaid:
  38. if hasattr(self.aaid, 'to_alipay_dict'):
  39. params['aaid'] = self.aaid.to_alipay_dict()
  40. else:
  41. params['aaid'] = self.aaid
  42. if self.auth_type:
  43. if hasattr(self.auth_type, 'to_alipay_dict'):
  44. params['auth_type'] = self.auth_type.to_alipay_dict()
  45. else:
  46. params['auth_type'] = self.auth_type
  47. if self.build_model:
  48. if hasattr(self.build_model, 'to_alipay_dict'):
  49. params['build_model'] = self.build_model.to_alipay_dict()
  50. else:
  51. params['build_model'] = self.build_model
  52. if self.device_id:
  53. if hasattr(self.device_id, 'to_alipay_dict'):
  54. params['device_id'] = self.device_id.to_alipay_dict()
  55. else:
  56. params['device_id'] = self.device_id
  57. return params
  58. @staticmethod
  59. def from_alipay_dict(d):
  60. if not d:
  61. return None
  62. o = AlipaySecurityProdFingerprintRiskcontrolQueryModel()
  63. if 'aaid' in d:
  64. o.aaid = d['aaid']
  65. if 'auth_type' in d:
  66. o.auth_type = d['auth_type']
  67. if 'build_model' in d:
  68. o.build_model = d['build_model']
  69. if 'device_id' in d:
  70. o.device_id = d['device_id']
  71. return o