AlipayOpenPublicTemplateMessageIndustryModifyModel.py 3.1 KB

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