AlipayEbppIndustryBizinfoQueryModel.py 2.4 KB

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