AlipayDataDataserviceHolographicFactorQueryModel.py 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  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.HoloGraphicContactInfo import HoloGraphicContactInfo
  6. class AlipayDataDataserviceHolographicFactorQueryModel(object):
  7. def __init__(self):
  8. self._biz_id = None
  9. self._cert_no = None
  10. self._contact_info_list = None
  11. self._isv_feature = None
  12. self._mobile = None
  13. self._user_name = None
  14. @property
  15. def biz_id(self):
  16. return self._biz_id
  17. @biz_id.setter
  18. def biz_id(self, value):
  19. self._biz_id = value
  20. @property
  21. def cert_no(self):
  22. return self._cert_no
  23. @cert_no.setter
  24. def cert_no(self, value):
  25. self._cert_no = value
  26. @property
  27. def contact_info_list(self):
  28. return self._contact_info_list
  29. @contact_info_list.setter
  30. def contact_info_list(self, value):
  31. if isinstance(value, list):
  32. self._contact_info_list = list()
  33. for i in value:
  34. if isinstance(i, HoloGraphicContactInfo):
  35. self._contact_info_list.append(i)
  36. else:
  37. self._contact_info_list.append(HoloGraphicContactInfo.from_alipay_dict(i))
  38. @property
  39. def isv_feature(self):
  40. return self._isv_feature
  41. @isv_feature.setter
  42. def isv_feature(self, value):
  43. self._isv_feature = value
  44. @property
  45. def mobile(self):
  46. return self._mobile
  47. @mobile.setter
  48. def mobile(self, value):
  49. self._mobile = value
  50. @property
  51. def user_name(self):
  52. return self._user_name
  53. @user_name.setter
  54. def user_name(self, value):
  55. self._user_name = value
  56. def to_alipay_dict(self):
  57. params = dict()
  58. if self.biz_id:
  59. if hasattr(self.biz_id, 'to_alipay_dict'):
  60. params['biz_id'] = self.biz_id.to_alipay_dict()
  61. else:
  62. params['biz_id'] = self.biz_id
  63. if self.cert_no:
  64. if hasattr(self.cert_no, 'to_alipay_dict'):
  65. params['cert_no'] = self.cert_no.to_alipay_dict()
  66. else:
  67. params['cert_no'] = self.cert_no
  68. if self.contact_info_list:
  69. if isinstance(self.contact_info_list, list):
  70. for i in range(0, len(self.contact_info_list)):
  71. element = self.contact_info_list[i]
  72. if hasattr(element, 'to_alipay_dict'):
  73. self.contact_info_list[i] = element.to_alipay_dict()
  74. if hasattr(self.contact_info_list, 'to_alipay_dict'):
  75. params['contact_info_list'] = self.contact_info_list.to_alipay_dict()
  76. else:
  77. params['contact_info_list'] = self.contact_info_list
  78. if self.isv_feature:
  79. if hasattr(self.isv_feature, 'to_alipay_dict'):
  80. params['isv_feature'] = self.isv_feature.to_alipay_dict()
  81. else:
  82. params['isv_feature'] = self.isv_feature
  83. if self.mobile:
  84. if hasattr(self.mobile, 'to_alipay_dict'):
  85. params['mobile'] = self.mobile.to_alipay_dict()
  86. else:
  87. params['mobile'] = self.mobile
  88. if self.user_name:
  89. if hasattr(self.user_name, 'to_alipay_dict'):
  90. params['user_name'] = self.user_name.to_alipay_dict()
  91. else:
  92. params['user_name'] = self.user_name
  93. return params
  94. @staticmethod
  95. def from_alipay_dict(d):
  96. if not d:
  97. return None
  98. o = AlipayDataDataserviceHolographicFactorQueryModel()
  99. if 'biz_id' in d:
  100. o.biz_id = d['biz_id']
  101. if 'cert_no' in d:
  102. o.cert_no = d['cert_no']
  103. if 'contact_info_list' in d:
  104. o.contact_info_list = d['contact_info_list']
  105. if 'isv_feature' in d:
  106. o.isv_feature = d['isv_feature']
  107. if 'mobile' in d:
  108. o.mobile = d['mobile']
  109. if 'user_name' in d:
  110. o.user_name = d['user_name']
  111. return o